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

: ${port:=9102}
: ${cfgfile:=/etc/bacula/bacula-fd.conf}
: ${exec_user:=root}
: ${exec_group:=root}

name="Bacula File Daemon"
command="/usr/sbin/$RC_SVCNAME"
command_args="-u $exec_user -g $exec_group -c $cfgfile"
pidfile="/var/run/bacula/$RC_SVCNAME.$port.pid"

depend() {
	need net
	use dns
}

start_pre() {
        checkpath -d -m 0775 -o ${exec_user}:${exec_group} /var/run/bacula
}