From: Alexander Golovko Date: Thu, 6 Sep 2012 17:16:26 +0000 (+0200) Subject: Delegate uid/gid changing to systemd. Fixes bug #1905 X-Git-Tag: Release-5.2.11~21 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=67b331725ec9b30c7235d67aa639239d68aabeee;p=bacula%2Fbacula Delegate uid/gid changing to systemd. Fixes bug #1905 --- diff --git a/bacula/platforms/systemd/bacula-dir.service.in b/bacula/platforms/systemd/bacula-dir.service.in index 265e92b64c..9a82532e29 100644 --- a/bacula/platforms/systemd/bacula-dir.service.in +++ b/bacula/platforms/systemd/bacula-dir.service.in @@ -26,10 +26,12 @@ ConditionPathIsDirectory=@working_dir@ [Service] Type=forking +User=@dir_user@ +Group=@dir_group@ PIDFile=@piddir@/bacula-dir.@dir_port@.pid # EnvironmentFile=-/etc/sysconfig/bacula-dir StandardOutput=syslog -ExecStart=@sbindir@/bacula-dir -u @dir_user@ -g @dir_group@ -c @sysconfdir@/bacula-dir.conf +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 diff --git a/bacula/platforms/systemd/bacula-fd.service.in b/bacula/platforms/systemd/bacula-fd.service.in index 8463bbd287..3efb256628 100644 --- a/bacula/platforms/systemd/bacula-fd.service.in +++ b/bacula/platforms/systemd/bacula-fd.service.in @@ -21,9 +21,11 @@ After=var-run.mount nss-lookup.target network.target remote-fs.target syslog.tar [Service] Type=forking +User=@fd_user@ +Group=@fd_group@ PIDFile=@piddir@/bacula-fd.@fd_port@.pid StandardOutput=syslog -ExecStart=@sbindir@/bacula-fd -u @fd_user@ -g @fd_group@ -c @sysconfdir@/bacula-fd.conf +ExecStart=@sbindir@/bacula-fd -c @sysconfdir@/bacula-fd.conf [Install] WantedBy=multi-user.target diff --git a/bacula/platforms/systemd/bacula-sd.service.in b/bacula/platforms/systemd/bacula-sd.service.in index ba78f7f806..2d4dc1a519 100644 --- a/bacula/platforms/systemd/bacula-sd.service.in +++ b/bacula/platforms/systemd/bacula-sd.service.in @@ -21,10 +21,12 @@ After=var-run.mount nss-lookup.target network.target remote-fs.target syslog.tar [Service] Type=forking +User=@sd_user@ +Group=@sd_group@ 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 +ExecStart=@sbindir@/bacula-sd -c @sysconfdir@/bacula-sd.conf [Install] WantedBy=multi-user.target