2017-07-20 13:59:53 +00:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
|
|
|
: ${port:=9103}
|
2017-12-11 08:30:19 +00:00
|
|
|
: ${cfgfile:=/etc/bacula/bacula-sd.conf}
|
|
|
|
: ${command_user:=bacula}
|
|
|
|
: ${command_group:=bacula}
|
2017-07-20 13:59:53 +00:00
|
|
|
|
|
|
|
name="Bacula Storage Daemon"
|
2017-12-11 08:30:19 +00:00
|
|
|
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"
|
2017-07-20 13:59:53 +00:00
|
|
|
|
|
|
|
depend() {
|
|
|
|
need net
|
|
|
|
use dns
|
2017-12-11 08:30:19 +00:00
|
|
|
after firewall
|
2017-07-20 13:59:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
start_pre() {
|
2019-01-08 10:38:25 +00:00
|
|
|
checkpath --quiet --directory --mode 0775 \
|
|
|
|
--owner ${command_user}:${command_group} $(dirname $pidfile)
|
2017-07-20 13:59:53 +00:00
|
|
|
}
|