]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix bacula-sd systemd unit
authorMark Felder <feld@feld.me>
Sun, 3 Sep 2023 18:20:15 +0000 (14:20 -0400)
committerDan Langille <dan@langille.org>
Wed, 6 Sep 2023 00:00:39 +0000 (00:00 +0000)
- no @piddir, no pidfile required for systemd, so don't try to create one or it will fail
- the -t flag only tests the config and prevents the service from starting
- the -v flag gets us useful logs into the systemd journal if there is a problem with the configuration

The service could not work at all without adding the -P flag and removing the -t flag

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

index 0e7b50eb94b9b3cc365c1f0e0bc8ad32ad02f223..4638e55740a0ff0d003afdf17314ae91eeeba99e 100644 (file)
@@ -17,7 +17,7 @@
 Description=Bacula Storage Daemon service
 Requires=network.target
 After=network.target
-RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@ @piddir@
+RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@
 
 # from http://www.freedesktop.org/software/systemd/man/systemd.service.html
 [Service]
@@ -28,7 +28,7 @@ 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 -dt -c @sysconfdir@/bacula-sd.conf
+ExecStart=@sbindir@/bacula-sd -d -v -P -c @sysconfdir@/bacula-sd.conf
 StandardError=syslog
 TimeoutStopSec=3min
 LimitMEMLOCK=infinity