aboutsummaryrefslogtreecommitdiffstats
path: root/community/bareos/bareos-fd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'community/bareos/bareos-fd.initd')
-rw-r--r--community/bareos/bareos-fd.initd24
1 files changed, 15 insertions, 9 deletions
diff --git a/community/bareos/bareos-fd.initd b/community/bareos/bareos-fd.initd
index 84eb1b1c1a0..f0632261a0c 100644
--- a/community/bareos/bareos-fd.initd
+++ b/community/bareos/bareos-fd.initd
@@ -1,15 +1,21 @@
#!/sbin/openrc-run
-
-name="Bareos File daemon"
-pidfile=/run/bareos/bareos-fd.9102.pid
-command=/usr/sbin/bareos-fd
-command_args="-u root -g bareos"
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
depend() {
- need net
use dns
}
-start_pre() {
- checkpath -dm750 -o bareos "${pidfile%/*}"
-} \ No newline at end of file
+start() {
+ ebegin "Starting bareos file daemon"
+ checkpath -d -m 0750 -o root:bareos /run/bareos
+ start-stop-daemon --start --quiet --exec /usr/sbin/bareos-fd \
+ -- -p /run/bareos/bareos-fd.9102.pid ${FD_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping bareos file daemon"
+ start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-fd.9102.pid
+ eend $?
+}