aports/community/snapcast/snapcast-server.initd
Sören Tempel 1000910860 community/snapcast: fix OpenRC service
Without creating /var/lib/snapserver the services fails to start with
the following error message:

	Exception: failed to create settings directory: "/var/lib/snapserver/": 13

Because the snapcast process itself tries to create the directory but
doesn't run as root and therefore gets an EACCESS (13) error.

While at it I also specified the pidfile created by the snapcast
process. No idea how OpenRC was even able to track the service status
without it.
2019-01-20 00:47:44 +01:00

20 lines
344 B
Plaintext

#!/sbin/openrc-run
name=snapserver
command="/usr/bin/snapserver"
command_args="-d $snapserver_opts"
command_user="snapcast"
start_stop_daemon_args="--quiet"
pidfile="/run/snapserver/pid"
depend() {
need net
after firewall
}
start_pre() {
checkpath --directory --owner snapcast:audio --mode 0775 \
/run/snapserver /var/lib/snapserver
}