summaryrefslogtreecommitdiff
path: root/app-backup/bareos/files/bareos-dir.service
diff options
context:
space:
mode:
Diffstat (limited to 'app-backup/bareos/files/bareos-dir.service')
-rw-r--r--app-backup/bareos/files/bareos-dir.service34
1 files changed, 24 insertions, 10 deletions
diff --git a/app-backup/bareos/files/bareos-dir.service b/app-backup/bareos/files/bareos-dir.service
index 440d3c3be98d..a342671d0d00 100644
--- a/app-backup/bareos/files/bareos-dir.service
+++ b/app-backup/bareos/files/bareos-dir.service
@@ -1,13 +1,27 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+#
+# Bareos Director Daemon
+#
[Unit]
- Description=Bareos Director
- After=syslog.target network.target
- Requires=bareos-sd.service bareos-fd.service
-
-[Install]
- WantedBy=multi-user.target
+Description=Bareos Director Daemon
+Documentation=man:bareos-dir(8)
+Requires=nss-lookup.target network.target remote-fs.target time-sync.target
+After=nss-lookup.target network.target remote-fs.target time-sync.target postgresql.service mysql.service mariadb.service
+ConditionPathIsDirectory=/var/lib/bareos
[Service]
- Type=forking
- User=root
- ExecStartPre=-/bin/mkdir /run/bareos
- ExecStart=/usr/sbin/bareos-dir
+Type=forking
+User=bareos
+Group=bareos
+WorkingDirectory=/var/lib/bareos
+PIDFile=/run/bareos/bareos-dir.9101.pid
+StandardError=journal
+ExecStartPre=/usr/sbin/bareos-dir -t -f
+ExecStart=/usr/sbin/bareos-dir
+SuccessExitStatus=0 1 15
+#Restart=on-failure
+
+[Install]
+Alias=bareos-director.service
+WantedBy=multi-user.target