]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/systemd/bacula-dir.service.in
Delegate uid/gid changing to systemd. Fixes bug #1905
[bacula/bacula] / bacula / platforms / systemd / bacula-dir.service.in
1 # This file is part of package Bacula Director Daemon
2 #
3 # Copyright (c) 2011 Free Software Foundation Europe e.V.
4 # Bacula Community
5 # Author: Bruno Friedmann
6 # Description:
7 #    Used to start the bacula director daemon service (bacula-dir)
8 #     will be installed as /lib/systemd/system/bacula-dir.service
9 #    enable : systemctl enable bacula-dir.service
10 #        start : systemctl start bacula-dir.service
11 #
12 # Bacula Director Daemon service
13 #
14 [Unit]
15 Description=Bacula Director Daemon service
16 Alias=bacula-dir
17 Requires=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
18 After=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
19 # Dependency about the database
20 # We let administrators decide if they need it (if local db instance)
21 # Wants=@DEFAULT_DB_TYPE@.service
22 # Check if working dir exist and is a directory
23 ConditionPathIsDirectory=@working_dir@
24 # Before=
25 # Conflicts=
26
27 [Service]
28 Type=forking
29 User=@dir_user@
30 Group=@dir_group@
31 PIDFile=@piddir@/bacula-dir.@dir_port@.pid
32 # EnvironmentFile=-/etc/sysconfig/bacula-dir
33 StandardOutput=syslog
34 ExecStart=@sbindir@/bacula-dir -c @sysconfdir@/bacula-dir.conf
35 # This daemon should be able to reload the conf file
36 #ExecReload=/sbin/killproc -p @piddir@/bacula-dir.pid -HUP @sbindir@/bacula-dir
37
38 [Install]
39 WantedBy=multi-user.target