aboutsummaryrefslogtreecommitdiff
path: root/net-im/heisenbridge/files/heisenbridge.initd
blob: b5af35091047d14aab1218fc622a43ec8b73c3ba (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
#!/sbin/openrc-run
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

name="heisenbridge daemon"
description="a bouncer-style Matrix IRC bridge"

pidfile="/run/${RC_SVCNAME}.pid"
command="/usr/bin/python"
command_args="-m heisenbridge -c ${REGISTRATION} -l ${LISTEN_ADDRESS} -p ${LISTEN_PORT}  ${HOMESERVER}"
command_background=true
command_user="heisenbridge:heisenbridge"

output_log="/var/log/heisenbridge.log"
error_log="/var/log/heisenbridge.log"

depend() {
	need net
}

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