Find an attached patch which fix trouble on newer systemd (the fix is 
compatible with older version)

Resume about the changes.

Remove obsolete syslog.target could fail on newer systemd
Added documentation line for each service 
Added soft dependency for postgresql & mysql 
Added Restart on-failure

Have a lot of fun!

-- 

Bruno Friedmann 
Ioda-Net Sàrl www.ioda-net.ch
 
openSUSE Member
GPG KEY : D5C9B751C4653227
irc: tigerfoot
>From 06d177d4e9e3f3187a91ee134d6aaa731eb06fe9 Mon Sep 17 00:00:00 2001
From: Bruno Friedmann <br...@ioda-net.ch>
Date: Wed, 23 Oct 2013 21:32:17 +0200
Subject: [PATCH] Remove obsolete syslog.target could fail on newer systemd
 Added documentation line for each service Added soft dependency for
 postgresql & mysql Added Restart on-failure

---
 bacula/platforms/systemd/bacula-dir.service.in | 11 +++++++----
 bacula/platforms/systemd/bacula-fd.service.in  |  7 +++++--
 bacula/platforms/systemd/bacula-sd.service.in  |  6 ++++--
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/bacula/platforms/systemd/bacula-dir.service.in b/bacula/platforms/systemd/bacula-dir.service.in
index 9a82532..c6b34cd 100644
--- a/bacula/platforms/systemd/bacula-dir.service.in
+++ b/bacula/platforms/systemd/bacula-dir.service.in
@@ -13,11 +13,12 @@
 #
 [Unit]
 Description=Bacula Director Daemon service
-Alias=bacula-dir
-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
+Documentation=man:bacula-dir(8)
+Requires=var-run.mount nss-lookup.target network.target remote-fs.target time-sync.target
+After=var-run.mount nss-lookup.target network.target remote-fs.target time-sync.target mysql.service postgresql.service
 # Dependency about the database
-# We let administrators decide if they need it (if local db instance)
+# Administrators can decide if they need it (like a local db instance) as an hard dependency
+# The soft way or remote is already placed in the After line
 # Wants=@DEFAULT_DB_TYPE@.service
 # Check if working dir exist and is a directory
 ConditionPathIsDirectory=@working_dir@
@@ -34,6 +35,8 @@ StandardOutput=syslog
 ExecStart=@sbindir@/bacula-dir -c @sysconfdir@/bacula-dir.conf
 # This daemon should be able to reload the conf file
 #ExecReload=/sbin/killproc -p @piddir@/bacula-dir.pid -HUP @sbindir@/bacula-dir
+Restart=on-failure
 
 [Install]
 WantedBy=multi-user.target
+
diff --git a/bacula/platforms/systemd/bacula-fd.service.in b/bacula/platforms/systemd/bacula-fd.service.in
index 3efb256..7750a65 100644
--- a/bacula/platforms/systemd/bacula-fd.service.in
+++ b/bacula/platforms/systemd/bacula-fd.service.in
@@ -13,8 +13,9 @@
 #
 [Unit]
 Description=Bacula File 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
+Documentation=man:bacula-fd(8)
+Requires=var-run.mount nss-lookup.target network.target remote-fs.target time-sync.target
+After=var-run.mount nss-lookup.target network.target remote-fs.target time-sync.target
 # Wants=
 # Before=
 # Conflicts=
@@ -26,6 +27,8 @@ Group=@fd_group@
 PIDFile=@piddir@/bacula-fd.@fd_port@.pid
 StandardOutput=syslog
 ExecStart=@sbindir@/bacula-fd -c @sysconfdir@/bacula-fd.conf
+Restart=on-failure
+# IOSchedulingClass=idle
 
 [Install]
 WantedBy=multi-user.target
diff --git a/bacula/platforms/systemd/bacula-sd.service.in b/bacula/platforms/systemd/bacula-sd.service.in
index 2d4dc1a..aa2a493 100644
--- a/bacula/platforms/systemd/bacula-sd.service.in
+++ b/bacula/platforms/systemd/bacula-sd.service.in
@@ -13,8 +13,9 @@
 #
 [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
+Documentation=man:bacula-sd(8)
+Requires=var-run.mount nss-lookup.target network.target remote-fs.target time-sync.target
+After=var-run.mount nss-lookup.target network.target remote-fs.target time-sync.target
 # Wants=
 # Before=
 # Conflicts=
@@ -27,6 +28,7 @@ PIDFile=@piddir@/bacula-sd.@sd_port@.pid
 # EnvironmentFile=-/etc/sysconfig/bacula-sd
 StandardOutput=syslog
 ExecStart=@sbindir@/bacula-sd -c @sysconfdir@/bacula-sd.conf
+Restart=on-failure
 
 [Install]
 WantedBy=multi-user.target
-- 
1.8.1.4

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to