]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
systemd unit file fixes fix-systemd 1/head
authorMark Felder <feld@feld.me>
Mon, 4 Sep 2023 13:43:04 +0000 (09:43 -0400)
committerDan Langille <dan@langille.org>
Wed, 6 Sep 2023 01:22:03 +0000 (01:22 +0000)
bacula-sd was not able to run at all as it only tested config and exited

bacula-fd and bacula-dir were using the foreground option, but should have Type=exec which is the current best practice as of systemd 240 [1]

[1] https://github.com/systemd/systemd/commit/fcb975129693d2d82dafb839fa66b9ac027bb080

bacula/platforms/systemd/bacula-dir.service.in
bacula/platforms/systemd/bacula-fd.service.in
bacula/platforms/systemd/bacula-sd.service.in

index 72f211dfb90fab2f243cd394426b2d3e513e3fc0..19c378f05b0adb239cee08704dbe063bbd0fef50 100644 (file)
@@ -22,7 +22,7 @@ RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@
 
 # From http://www.freedesktop.org/software/systemd/man/systemd.service.html
 [Service]
-Type=simple
+Type=exec
 User=@dir_user@
 Group=@dir_group@
 ExecStart=@sbindir@/bacula-dir -fP -c @sysconfdir@/bacula-dir.conf
index 2cbe483dc203d60f207919f5b80850ac7b86e3c6..af8226919989f5171fbdead176efcd61859bc928 100644 (file)
@@ -22,7 +22,7 @@ RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@
 
 # from http://www.freedesktop.org/software/systemd/man/systemd.service.html
 [Service]
-Type=simple
+Type=exec
 User=@fd_user@
 Group=@fd_group@
 ExecStart=@sbindir@/bacula-fd -fP -c @sysconfdir@/bacula-fd.conf
index 4638e55740a0ff0d003afdf17314ae91eeeba99e..9dd117c1c93af6178af92cde6222912bc52c353a 100644 (file)
@@ -21,14 +21,14 @@ RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@
 
 # from http://www.freedesktop.org/software/systemd/man/systemd.service.html
 [Service]
-Type=forking
+Type=exec
 User=@sd_user@
 Group=@sd_group@
 SupplementaryGroups=@sd_user@
 Environment="LD_LIBRARY_PATH=@libdir@"
 # comment out to get traces working at startup using -T and -d options
 #WorkingDirectory=@working_dir@
-ExecStart=@sbindir@/bacula-sd -d -v -P -c @sysconfdir@/bacula-sd.conf
+ExecStart=@sbindir@/bacula-sd -fP -c @sysconfdir@/bacula-sd.conf
 StandardError=syslog
 TimeoutStopSec=3min
 LimitMEMLOCK=infinity