aboutsummaryrefslogtreecommitdiffstats
path: root/main/bacula/bacula-fd.initd
blob: 1e33abc1c0997c6f840100bb77444ed0f6cfff23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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)
}