From: Mark Felder Date: Mon, 4 Sep 2023 13:43:04 +0000 (-0400) Subject: systemd unit file fixes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddfac305c077b74620b30e56f32c925450d8ea5f;p=thirdparty%2Fbacula.git systemd unit file fixes 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 --- diff --git a/bacula/platforms/systemd/bacula-dir.service.in b/bacula/platforms/systemd/bacula-dir.service.in index 72f211dfb..19c378f05 100644 --- a/bacula/platforms/systemd/bacula-dir.service.in +++ b/bacula/platforms/systemd/bacula-dir.service.in @@ -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 diff --git a/bacula/platforms/systemd/bacula-fd.service.in b/bacula/platforms/systemd/bacula-fd.service.in index 2cbe483dc..af8226919 100644 --- a/bacula/platforms/systemd/bacula-fd.service.in +++ b/bacula/platforms/systemd/bacula-fd.service.in @@ -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 diff --git a/bacula/platforms/systemd/bacula-sd.service.in b/bacula/platforms/systemd/bacula-sd.service.in index 4638e5574..9dd117c1c 100644 --- a/bacula/platforms/systemd/bacula-sd.service.in +++ b/bacula/platforms/systemd/bacula-sd.service.in @@ -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