aboutsummaryrefslogtreecommitdiffstats
path: root/main/bacula/bacula-sd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/bacula/bacula-sd.initd')
-rw-r--r--main/bacula/bacula-sd.initd17
1 files changed, 10 insertions, 7 deletions
diff --git a/main/bacula/bacula-sd.initd b/main/bacula/bacula-sd.initd
index 3d56a9e8f2..a678299e55 100644
--- a/main/bacula/bacula-sd.initd
+++ b/main/bacula/bacula-sd.initd
@@ -1,20 +1,23 @@
#!/sbin/openrc-run
: ${port:=9103}
-: ${cfgfile:=/etc/bacula/bacula-dir.conf}
-: ${exec_user:=bacula}
-: ${exec_group:=bacula}
+: ${cfgfile:=/etc/bacula/bacula-sd.conf}
+: ${command_user:=bacula}
+: ${command_group:=bacula}
name="Bacula Storage Daemon"
-command="/usr/sbin/$RC_SVCNAME"
-command_args="-u $exec_user -g $exec_group -c $cfgfile"
-pidfile="/var/run/bacula/$RC_SVCNAME.$port.pid"
+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 -d -m 0775 -o ${exec_user}:${exec_group} /var/run/bacula
+ checkpath --directory --mode 0775 \
+ --owner ${command_user}:${command_group} /run/bacula
}