aboutsummaryrefslogtreecommitdiff
path: root/net-im/mautrix-facebook/files/mautrix-facebook.initd
blob: 22c826a67ee6e6c17d25ed857e08e6f6df662681 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/sbin/openrc-run
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

name="mautrix-facebook daemon"
description="A Matrix-Facebook Messenger puppeting bridge"
module="mautrix_facebook"

pidfile="/run/${RC_SVCNAME}.pid"
command="/usr/bin/python"
command_args="-m ${module} -c /etc/mautrix/${module}.yaml"
command_background=true
command_user="mautrix-facebook:mautrix"

output_log="/var/log/mautrix/facebook/daemon.log"
error_log="/var/log/mautrix/facebook/daemon.log"

depend() {
	need net
}

start_pre() {
	checkpath -d -m 0755 -o "$command_user" /var/lib/mautrix/facebook
	checkpath -f -m 0644 -o "$command_user" "$output_log"
}