/
bareos-dir.service.in
44 lines (42 loc) · 1.51 KB
/
bareos-dir.service.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# This file is part of package Bareos Director Daemon
#
# Copyright (c) 2011 Free Software Foundation Europe e.V.
# Bareos Community
# Author: Bruno Friedmann
# Description:
# Used to start the bareos director daemon service (bareos-dir)
# will be installed as /lib/systemd/system/bareos-dir.service
# enable : systemctl enable bareos-dir.service
# start : systemctl start bareos-dir.service
#
# Bareos Director Daemon service
#
[Unit]
Description=Bareos Director Daemon service
Documentation=man:bareos-dir(8)
Requires=nss-lookup.target network.target remote-fs.target time-sync.target
After=nss-lookup.target network.target remote-fs.target time-sync.target postgresql.service mysql.service mariadb.service
# Dependency about the database
# We let administrators decide if they need it (if local db instance)
# Wants=@DEFAULT_DB_TYPE@.service
# Check if working dir exist and is a directory
ConditionPathIsDirectory=@working_dir@
# Before=
# Conflicts=
[Service]
Type=forking
User=@dir_user@
Group=@dir_group@
WorkingDirectory=@working_dir@
PIDFile=@piddir@/bareos-dir.@dir_port@.pid
# EnvironmentFile=-/etc/sysconfig/bareos-dir
# StandardOutput=syslog
ExecStartPre=@sbindir@/bareos-dir -c @confdir@/bareos-dir.conf -t -f
ExecStart=@sbindir@/bareos-dir -c @confdir@/bareos-dir.conf
SuccessExitStatus=0 1 15
# This daemon should be able to reload the conf file
#ExecReload=/sbin/killproc -p @piddir@/bareos-dir.pid -HUP @sbindir@/bareos-dir
#Restart=on-failure
[Install]
Alias=bareos-director.service
WantedBy=multi-user.target