diff options
Diffstat (limited to 'community/bareos/bareos-dir.initd')
-rw-r--r-- | community/bareos/bareos-dir.initd | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/community/bareos/bareos-dir.initd b/community/bareos/bareos-dir.initd index b4649ddabec..916ee13b36c 100644 --- a/community/bareos/bareos-dir.initd +++ b/community/bareos/bareos-dir.initd @@ -1,16 +1,22 @@ #!/sbin/openrc-run - -name="Bareos Director daemon" -pidfile=/run/bareos/bareos-dir.9101.pid -command=/usr/sbin/bareos-dir -command_args="-u bareos -g bareos" +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 depend() { - need net - after firewall - use dns bareos-fd bareos-sd postgresql mariadb + need postgresql + use dns bareos-fd bareos-sd +} + +start() { + ebegin "Starting bareos director" + checkpath -d -m 0750 -o root:bareos /run/bareos + start-stop-daemon --start --quiet --exec /usr/sbin/bareos-dir \ + -- -p /run/bareos/bareos-dir.9101.pid ${DIR_OPTIONS} + eend $? } -start_pre() { - checkpath -dm750 -o bareos "${pidfile%/*}" +stop() { + ebegin "Stopping bareos director" + start-stop-daemon --stop --quiet --pidfile /run/bareos/bareos-dir.9101.pid + eend $? } |