aports/main/bacula/bacula-fd.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

24 lines
450 B
Plaintext

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