aboutsummaryrefslogtreecommitdiffstats
path: root/main/bacula/bacula-sd.initd
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-07-20 13:59:53 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-07-20 14:00:34 +0000
commit396be1be08687df19db556f9ad2c4b50b70a3fcf (patch)
tree9ab63feb471ca15739959e7f7d6498dec9e7a710 /main/bacula/bacula-sd.initd
parenta01e506e04855eb6b3a0589cfeeba667b49b575d (diff)
downloadaports-396be1be08687df19db556f9ad2c4b50b70a3fcf.tar.bz2
aports-396be1be08687df19db556f9ad2c4b50b70a3fcf.tar.xz
main/bacula$: rewrite init scripts
Diffstat (limited to 'main/bacula/bacula-sd.initd')
-rw-r--r--main/bacula/bacula-sd.initd20
1 files changed, 20 insertions, 0 deletions
diff --git a/main/bacula/bacula-sd.initd b/main/bacula/bacula-sd.initd
new file mode 100644
index 0000000000..42f99dbe4f
--- /dev/null
+++ b/main/bacula/bacula-sd.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+
+: ${port:=9103}
+: ${conf:=/etc/bacula/bacula-dir.conf}
+: ${exec_user:=bacula}
+: ${exec_group:=bacula}
+
+name="Bacula Storage Daemon"
+command="/usr/sbin/$RC_SVCNAME"
+command_args="-u $exec_user -g $exec_group -c $conf"
+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
+}