summaryrefslogtreecommitdiffstats
path: root/roles/bacula-sd/files/etc/systemd
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2020-11-03 03:15:10 +0100
committerGuilhem Moulin <guilhem@fripost.org>2020-11-03 03:37:11 +0100
commitead9aaa3dd7ca48012b2b21cc930ee73c8eaa9d3 (patch)
treeb656f589d1ff4d4b0d245afad3d8d22ce5e65368 /roles/bacula-sd/files/etc/systemd
parent24616de43c39da3fe7efd72426fce078a3afdaea (diff)
Bacula: refactor systemd service files.
Use unit overrides on top of upstream's service files instead of overriding entire service files. In particular, upstream uses flag `-P` so we don't need to use RuntimeDirectory= anymore.
Diffstat (limited to 'roles/bacula-sd/files/etc/systemd')
-rw-r--r--roles/bacula-sd/files/etc/systemd/system/bacula-sd.service.d/override.conf (renamed from roles/bacula-sd/files/etc/systemd/system/bacula-sd.service)14
1 files changed, 0 insertions, 14 deletions
diff --git a/roles/bacula-sd/files/etc/systemd/system/bacula-sd.service b/roles/bacula-sd/files/etc/systemd/system/bacula-sd.service.d/override.conf
index 61ba01d..e4ed970 100644
--- a/roles/bacula-sd/files/etc/systemd/system/bacula-sd.service
+++ b/roles/bacula-sd/files/etc/systemd/system/bacula-sd.service.d/override.conf
@@ -1,14 +1,4 @@
[Unit]
-Description=Bacula Storage Daemon service
-After=network.target
-
-[Service]
-Type=simple
-StandardOutput=syslog
-User=bacula
-Group=tape
-ExecStart=/usr/sbin/bacula-sd -f -c /etc/bacula/bacula-sd.conf
-
# Hardening
NoNewPrivileges=yes
PrivateDevices=yes
@@ -16,12 +6,8 @@ ProtectHome=yes
ProtectSystem=strict
ReadWriteDirectories=-/var/lib/bacula
ReadWriteDirectories=/mnt/backup/bacula
-RuntimeDirectory=bacula
PrivateDevices=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
RestrictAddressFamilies=AF_INET AF_INET6
-
-[Install]
-WantedBy=multi-user.target