aports/main/bacula/bacula-sd.initd
Leonardo Arena aad36dcf3a main/bacula: make sure that the pidfile can be written by bacula-fd
Cosmetic adjustments to the other inits
2019-01-08 10:39:02 +00:00

23 lines
517 B
Bash

#!/sbin/openrc-run
: ${port:=9103}
: ${cfgfile:=/etc/bacula/bacula-sd.conf}
: ${command_user:=bacula}
: ${command_group:=bacula}
name="Bacula Storage Daemon"
command="/usr/sbin/${RC_SVCNAME}"
command_args="-c $cfgfile"
start_stop_daemon_args="--user $command_user --group $command_group"
pidfile="/run/bacula/${RC_SVCNAME}.$port.pid"
depend() {
need net
use dns
after firewall
}
start_pre() {
checkpath --quiet --directory --mode 0775 \
--owner ${command_user}:${command_group} $(dirname $pidfile)
}