aports/testing/ma1sd/ma1sd.initd
2024-05-07 20:02:15 +00:00

20 lines
424 B
Bash

#!/sbin/openrc-run
supervisor=supervise-daemon
name="ma1sd"
description="Daemon for ma1sd, the federated Matrix identity server"
: ${command_user:="ma1sd:ma1sd"}
: ${config:="/etc/ma1sd/ma1sd.yaml"}
command="/usr/bin/ma1sd"
command_args="-c $config $command_args"
depend() {
need net
}
start_pre() {
# /var/lib/ma1sd needs to be owned by the ma1sd user
checkpath --directory --owner "$command_user" /var/lib/ma1sd
}