aboutsummaryrefslogtreecommitdiffstats
path: root/main/bacula/bacula-dir.initd
blob: 8efa3a5285df66a6dcb62cdcb50ba3338f0a865c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/sbin/openrc-run

: ${port:=9101}
: ${cfgfile:=/etc/bacula/bacula-dir.conf}
: ${command_user:=bacula}
: ${command_group:=bacula}

name="Bacula Director"
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)
}