Make bacula-fd run as user bacula on stretch
authorJulien Cristau <jcristau@debian.org>
Sun, 29 Jan 2017 14:06:22 +0000 (15:06 +0100)
committerJulien Cristau <jcristau@debian.org>
Sun, 29 Jan 2017 14:20:13 +0000 (15:20 +0100)
modules/bacula/files/bacula-fd-systemd [new file with mode: 0644]
modules/bacula/manifests/client.pp

diff --git a/modules/bacula/files/bacula-fd-systemd b/modules/bacula/files/bacula-fd-systemd
new file mode 100644 (file)
index 0000000..0dc6031
--- /dev/null
@@ -0,0 +1,2 @@
+[Service]
+ExecStart=/usr/sbin/bacula-fd -f -u bacula -k -c $CONFIG
index 7900e9a..0b2b671 100644 (file)
@@ -50,6 +50,13 @@ class bacula::client inherits bacula {
                require => Package['bacula-fd'],
                notify  => Service['bacula-fd'],
        }
+       file { '/etc/systemd/system/bacula-fd.service.d/user.conf':
+               source  => 'puppet:///modules/bacula/bacula-fd-systemd',
+               mode    => '0400',
+               owner   => root,
+               group   => root,
+               notify  => Service['bacula-fd'],
+       }
 
        @ferm::rule { 'dsa-bacula-fd-v4':
                domain      => '(ip)',