]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/platforms/systemd/bacula-sd.service.in
systemd: Give 3mins to the bacula-sd service to stop and close the dde
[bacula/bacula] / bacula / platforms / systemd / bacula-sd.service.in
index ba78f7f806c71fa6764b16933794b5be710d05f6..6de48ba804150504adcbce058e57a45c19358d85 100644 (file)
@@ -1,30 +1,34 @@
-# This file is part of package Bacula Storage Daemon
+# Systemd Bacula service file
+#
+# Copyright (C) 2000-2016 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+# /lib/systemd/system/bacula-sd.service
 #
-# Copyright (c) 2011 Free Software Foundation Europe e.V.
-# for Bacula Community
-# Author: Bruno Friedmann
 # Description:
 #    Used to start the bacula storage daemon service (bacula-sd)
-#    will be installed as /lib/systemd/system/bacula-sd.service
-#    enable : systemctl enable bacula-sd.service
-#    start : systemctl start bacula-sd.service
+#    enable : systemctl enable bacula-sd
+#    start : systemctl start bacula-sd
 #
-# Bacula Storage Daemon service
 #
+
+# from http://www.freedesktop.org/software/systemd/man/systemd.unit.html
 [Unit]
 Description=Bacula Storage Daemon service
-Requires=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
-After=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
-# Wants=
-# Before=
-# Conflicts=
+Requires=network.target
+After=network.target
+RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@ @piddir@
 
+# from http://www.freedesktop.org/software/systemd/man/systemd.service.html
 [Service]
 Type=forking
+User=@sd_user@
+Group=@sd_group@
+ExecStart=@sbindir@/bacula-sd -c @sysconfdir@/bacula-sd.conf
 PIDFile=@piddir@/bacula-sd.@sd_port@.pid
-# EnvironmentFile=-/etc/sysconfig/bacula-sd
-StandardOutput=syslog
-ExecStart=@sbindir@/bacula-sd -u @sd_user@ -g @sd_group@ -c @sysconfdir@/bacula-sd.conf
+StandardError=syslog
+#LimitMEMLOCK=infinity
+TimeoutStopSec=3min
 
 [Install]
 WantedBy=multi-user.target