From b160ff18250c41e06e3390fbc3896b9673bbea0c Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 23 Nov 2011 13:03:26 +0100 Subject: [PATCH] Add systemd files --- .../platforms/systemd/bacula-dir.service.in | 37 +++++++++++++++++++ bacula/platforms/systemd/bacula-fd.service.in | 30 +++++++++++++++ bacula/platforms/systemd/bacula-sd.service.in | 30 +++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 bacula/platforms/systemd/bacula-dir.service.in create mode 100644 bacula/platforms/systemd/bacula-fd.service.in create mode 100644 bacula/platforms/systemd/bacula-sd.service.in diff --git a/bacula/platforms/systemd/bacula-dir.service.in b/bacula/platforms/systemd/bacula-dir.service.in new file mode 100644 index 0000000000..5c928c1315 --- /dev/null +++ b/bacula/platforms/systemd/bacula-dir.service.in @@ -0,0 +1,37 @@ +# This file is part of package Bacula Director Daemon +# +# Copyright (c) 2011 Free Software Foundation Europe e.V. +# Bacula Community +# Author: Bruno Friedmann +# Description: +# Used to start the bacula director daemon service (bacula-dir) +# will be installed as /lib/systemd/system/bacula-dir.service +# enable : systemctl enable bacula-dir.service +# start : systemctl start bacula-dir.service +# +# Bacula Director Daemon service +# +[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 +# 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 +PIDFile=@piddir@/bacula-dir.pid +# EnvironmentFile=-/etc/sysconfig/bacula-dir +StandardOutput=syslog +ExecStart=@sbindir@/bacula-dir -u @dir_user@ -g @dir_group@ -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 + +[Install] +WantedBy=multi-user.target diff --git a/bacula/platforms/systemd/bacula-fd.service.in b/bacula/platforms/systemd/bacula-fd.service.in new file mode 100644 index 0000000000..23169c5cf3 --- /dev/null +++ b/bacula/platforms/systemd/bacula-fd.service.in @@ -0,0 +1,30 @@ +File daemon ( actually work well) +# This file is part of package Bacula File Daemon +# +# Copyright (c) 2011 Free Software Foundation Europe e.V. +# Bacula Community +# Author: Bruno Friedmann +# Description: +# Used to start the bacula file daemon service (bacula-fd) +# will be installed as /lib/systemd/system/bacula-fd.service +# enable : systemctl enable bacula-fd.service +# start : systemctl start bacula-fd.service +# +# Bacula File Daemon service +# +[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 +# Wants= +# Before= +# Conflicts= + +[Service] +Type=forking +PIDFile=@piddir@/bacula-fd.pid +StandardOutput=syslog +ExecStart=@sbindir@/bacula-fd -u @fd_user@ -g @fd_group@ -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 new file mode 100644 index 0000000000..58687dcc9a --- /dev/null +++ b/bacula/platforms/systemd/bacula-sd.service.in @@ -0,0 +1,30 @@ +# This file is part of package Bacula Storage Daemon +# +# Copyright (c) 2011 Free Software Foundation Europe e.V. +# for Bacula Community +# Author: Bruno Friedmann +# Description: +# Used to start the bacula storage daemon service (bacula-sd) +# will be installed as /lib/systemd/system/bacula-sd.service +# enable : systemctl enable bacula-sd.service +# start : systemctl start bacula-sd.service +# +# Bacula Storage Daemon service +# +[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 +# Wants= +# Before= +# Conflicts= + +[Service] +Type=forking +PIDFile=@piddir@/bacula-sd.pid +# EnvironmentFile=-/etc/sysconfig/bacula-sd +StandardOutput=syslog +ExecStart=@sbindir@/bacula-sd -u @sd_user@ -g @sd_group@ -c @sysconfdir@/bacula-sd.conf + +[Install] +WantedBy=multi-user.target -- 2.39.5