+#
# Master Makefile
#
# Author: Kern Sibbald, Copyright 2000-2015
srcdir = @srcdir@
VPATH = @srcdir@
.PATH: @srcdir@
-topdir = .
-thisdir = .
+topdir = @BUILD_DIR@
+thisdir = @BUILD_DIR@
first_rule: all
@for I in ${all_subdirs}; \
do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
-bacula-fd: Makefile
+bacula-fd: Makefile
@for I in ${fd_subdirs}; \
do (cd $$I; echo "==>Entering directory `pwd`"; \
$(MAKE) DESTDIR=$(DESTDIR) all || \
$(MKDIR) $(DESTDIR)$(scriptdir)
$(MKDIR) $(DESTDIR)$(docdir)
$(MKDIR) $(DESTDIR)$(archivedir)
+ $(MKDIR) $(DESTDIR)$(bsrdir)
+ $(MKDIR) $(DESTDIR)${logdir}
-if test ! -d $(DESTDIR)$(working_dir) ; then \
$(MKDIR) $(DESTDIR)$(working_dir); \
chmod 770 $(DESTDIR)$(working_dir); \
fi
-if test "x$(dir_user)" != "x" ; then \
chown $(dir_user) $(DESTDIR)$(working_dir); \
+ chown $(dir_user) $(DESTDIR)$(logdir); \
fi
-if test "x$(dir_group)" != "x" ; then \
chgrp $(dir_group) $(DESTDIR)$(working_dir); \
+ chgrp $(dir_group) $(DESTDIR)$(logdir); \
fi
install: installdirs
@for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
install-autostart:
- (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
+ (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
install-autostart-dir:
- (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
+ (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
install-autostart-fd:
- (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
+ (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
install-autostart-sd:
- (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
+ (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
uninstall-autostart:
(cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
@$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
@$(RMF) bconsole gconsole
@$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
- @$(RMF) working/* kerns-*
+ @$(RMF) working/* kerns-*
@$(RMF) -rf txt diff src/python src/testprogs
@$(RMF) libtool
distrib: configure autoconf/config.h.in distdirs distcopy
-test:
-
-
-tar.gz: ../$(VERNAME).tar.gz
-../$(VERNAME).tar.gz:
- (cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
-
-tar.Z: ../$(VERNAME).tar.Z
-../$(VERNAME).tar.Z:
- (cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
-
-tar.bz2: ../$(VERNAME).tar.bz2
-../$(VERNAME).tar.bz2:
- (cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
-
-uuencode: tar.gz
- uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
-
# ------------------------------------------------------------------------
if test "x$support_batch_insert" = "xyes"; then
dnl For sqlite checking
saved_LDFLAGS="${LDFLAGS}"
- LDFLAGS="${saved_LDFLAGS} -L$SQLITE_LIBDIR"
+ LDFLAGS="${saved_LDFLAGS} -lpthread -L$SQLITE_LIBDIR"
AC_CHECK_LIB(sqlite3, sqlite3_threadsafe, AC_DEFINE(HAVE_SQLITE3_THREADSAFE, 1, [Set if have sqlite3_threadsafe]))
if test "x$ac_cv_lib_sqlite3_sqlite3_threadsafe" = "xyes"; then
/* ------------------------------------------------------------------------- */
/* -- CONFIGURE SPECIFIED FEATURES -- */
/* ------------------------------------------------------------------------- */
+
+/*
+ * Author: Kern Sibbald, 2002-2015
+ * License: BSD 2-Clause
+ */
/* Define if you want to use MySQL as Catalog database */
#undef USE_MYSQL_DB
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown */
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
-scriptversion=2004-02-15.20
+scriptversion=2009-04-28.21; # UTC
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
+nl='
+'
+IFS=" "" $nl"
errstatus=0
-dirmode=""
+dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
- exit 0
+ exit $?
;;
-m) # -m PERM arg
shift
;;
--version)
echo "$0 $scriptversion"
- exit 0
+ exit $?
;;
--) # stop option processing
shift
for file
do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ case $file in
+ /*) pathcomp=/ ;;
+ *) pathcomp= ;;
+ esac
+ oIFS=$IFS
+ IFS=/
+ set fnord $file
shift
+ IFS=$oIFS
- pathcomp=
for d
do
- pathcomp="$pathcomp$d"
+ test "x$d" = x && continue
+
+ pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
- lasterr=""
+ lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
fi
fi
- pathcomp="$pathcomp/"
+ pathcomp=$pathcomp/
done
done
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
item->D_sock->signal(BNET_HB_RESPONSE);
}
else {
- sprintf(answer, "BACULA WARNING - Unexpected signal received : %s ", bnet_sig_to_ascii(item->D_sock));
+ sprintf(answer, "BACULA WARNING - Unexpected signal received : %s ", bnet_sig_to_ascii(item->D_sock->msglen));
}
}
else { /* BNET_HARDEOF || BNET_ERROR */
.nh
<jltallon@adv\-solutions.net>.
.SH COPYRIGHT
-This man page document is released under the LGPL version 3.0 license.
+This man page document is released under the BSD 2-Clause license.
.SH NAME
bcopy \- Bacula's 'Copy from tape'
.SH SYNOPSIS
-.B bcopy
+.B bcopy
.RI [ options ]
-.I input-archive
+.I input-archive
.I output-archive
.br
.SH DESCRIPTION
command.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
-.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
+.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
.\" respectively.
.SH OPTIONS
A summary of options is included below.
.br
.SH AUTHOR
This manual page was written by Jose Luis Tallon
-.nh
+.nh
<jltallon@adv\-solutions.net>.
.SH COPYRIGHT
-This man page document is released under the LGPL version 3.0 license.
+This man page document is released under the BSD 2-Clause license.
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
#
# This is the makefile template for the platform directory
# which contains general platform installation.
# Makefile for the AXI specific installation.
#
# 1 March 2003 -- Kern Sibbald
+# Copyright (C) 2003-2015, Kern Sibbald
+# License: BSD 2-Clause
#
# for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
#
#
+# Copyright (C) Kern Sibbald 2004-2015
+# License: BSD 2-Clause
+#
# This file is used as the template to create the
# Makefile for the Tru64 specific installation.
#
#!/bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula File daemon.
#
# for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
#
+RETVAL=0
case "$1" in
start)
echo "Starting the Bacula File daemon: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
-exit 0
+exit $RETVAL
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
#
# This file is used as the template to create the
# Makefile for the Solaris specific installation.
#! /bin/sh
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
-exit 0
+exit $RETVAL
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula File daemon.
#
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
#
+RETVAL=0
case "$1" in
start)
echo "Starting the Bacula File daemon: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
-exit 0
+exit $RETVAL
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Storage daemon.
#
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
#
+RETVAL=0
case "$1" in
start)
echo "Starting the Bacula Storage daemon: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
-exit 0
+exit $RETVAL
# shell script to build bacula rpm release
# copy this script into a working directory with the src rpm to build and execute
# 19 Aug 2006 D. Scott Barninger
+#
+# Copyright Kern Sibbald 2006-2015
+# License: BSD 2-Clause
-# Copyright (C) 2006 Free Software Foundation Europe e.V.
-# licensed under GPL-v2
# signing rpms
# Make sure you have a .rpmmacros file in your home directory containing the following:
rm -rf ${RPMBUILD}/*
if [ "$BUILDBAT" = "1" ]; then
- echo Building Bat package for "$PLATFORM"...
- sleep 2
- rpmbuild --rebuild ${SRPM2}
- rm -rf ${RPMBUILD}/*
+ echo Building Bat package for "$PLATFORM"...
+ sleep 2
+ rpmbuild --rebuild ${SRPM2}
+ rm -rf ${RPMBUILD}/*
fi
echo Building Docs package for "$PLATFORM"...
rm -rf ${RPMBUILD}/*
if [ "$BUILDMTX" = "1" ]; then
- echo Building mtx package for "$PLATFORM"...
- sleep 2
- rpmbuild --rebuild ${SRPM4}
- rm -rf ${RPMBUILD}/*
+ echo Building mtx package for "$PLATFORM"...
+ sleep 2
+ rpmbuild --rebuild ${SRPM4}
+ rm -rf ${RPMBUILD}/*
fi
# delete the updatedb package and any debuginfo packages built
./bacula-sqlite-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
if [ "$BUILDMTX" = "1" ]; then
- mv -f ${RPMDIR}/bacula-mtx-${VERSION}-${RELEASE}.${ARCH}.rpm \
- ./bacula-mtx-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
+ mv -f ${RPMDIR}/bacula-mtx-${VERSION}-${RELEASE}.${ARCH}.rpm \
+ ./bacula-mtx-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
fi
mv -f ${RPMDIR}/bacula-client-${VERSION}-${RELEASE}.${ARCH}.rpm \
./bacula-libs-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
if [ "$BUILDBAT" = "1" ]; then
- mv -f ${RPMDIR}/bacula-bat-${VERSION}-${RELEASE}.${ARCH}.rpm \
- ./bacula-bat-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
+ mv -f ${RPMDIR}/bacula-bat-${VERSION}-${RELEASE}.${ARCH}.rpm \
+ ./bacula-bat-${VERSION}-${RELEASE}.${FILENAME}.${ARCH}.rpm
fi
mv -f ${RPMDIR2}/bacula-docs-${VERSION}-${RELEASE}.noarch.rpm .
# shell script wizard to build bacula rpm using gnome dialogs
# requires zenity to be installed
# 30 Jul 2006 D. Scott Barninger
+#
+# Copyright Kern Sibbald 2006-2015
+# License: BSD 2-Clause
-# Copyright (C) 2006 Free Software Foundation Europe e.V.
-# licensed under GPL-v2
# usage ./rpm_wizard.sh
# rpm public key package
-# Copyright (C) 2006 Free Software Foundation Europe e.V.
#
+# Copyright Kern Sibbald 2000-2015
+# License: BSD 2-Clause
#
# replace the string yournam with your name
Name: rpmkey-%{pubkeyname}
Version: 0.1
Release: 1
-License: GPL v2
+License: BSD 2-Clause
Group: System/Packages
Source0: %{pubkeyname}.asc
BuildArch: noarch
#
+# Copyright (C) Kern Sibbald 2003-2015
+# License: BSD 2-Clause
+#
# This file is used as the template to create the
# Makefile for the Darwin specific installation.
#
+#
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
#
# This file is used as the template to create the
# Makefile for the Debian/Ubuntu/Kubuntu specific installation.
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon on Debian/Ubuntu/Kubuntu
# systems.
fi
fi
+RETVAL=0
case "$1" in
start)
echo -n "Starting ${DESC}: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon on Debian/Ubuntu/Kubuntu
# systems.
fi
fi
+RETVAL=0
case "$1" in
start)
echo -n "Starting ${DESC}: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon on Debian/Ubuntu/Kubuntu
# systems.
fi
fi
+RETVAL=0
case "$1" in
start)
echo -n "Starting ${DESC}: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
#
# This file is used as the template to create the
# Makefile for the Solaris specific installation.
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon
#
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
-exit 0
+exit $RETVAL
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula File daemon.
#
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
#
+RETVAL=0
case "$1" in
start)
echo "Starting the Bacula File daemon: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
-exit 0
+exit $RETVAL
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Storage daemon.
#
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
#
+RETVAL=0
case "$1" in
start)
echo "Starting the Bacula Storage daemon: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
-exit 0
+exit $RETVAL
-#
+#
+# Copyright (C) Kern Sibbald 2003-2015
+# License: BSD 2-Clause
+#
# This file is used as the template to create the
# Makefile for the Gentoo specific installation.
#
#!/sbin/runscript
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon for the Gentoo release
#
#!/sbin/runscript
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula File daemon for the Gentoo release.
#
#!/sbin/runscript
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Storage daemon for the Gentoo release.
#
# Copyright 2004 D. Scott Barninger
-# Distributed under the terms of the GNU General Public License v2
+# Copyright Kern Sibbald 2004-2015
+# License: BSD 2-Clause
+#
#
# Modified from bacula-1.34.5.ebuild for 1.36.0 release
# 24 Oct 2004 D. Scott Barninger <barninger at fairfieldcomputers dot com>
HOMEPAGE="http://www.bacula.org/"
SRC_URI="mirror://sourceforge/bacula/${P}.tar.gz"
-LICENSE="GPL-2"
+LICENSE="BSD 2-Clause"
SLOT="0"
KEYWORDS="x86 ~ppc ~sparc ~amd64"
IUSE="readline tcpd gnome mysql sqlite X static postgres wxwindows bacula-clientonly bacula-split"
# mysql is the recommended choice ...
# may need sys-libs/libtermcap-compat but try without first
DEPEND=">=sys-libs/zlib-1.1.4
- readline? ( >=sys-libs/readline-4.1 )
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
- gnome? ( gnome-base/libgnome )
- gnome? ( app-admin/gnomesu )
- !bacula-clientonly? (
- sqlite? ( =dev-db/sqlite-2* )
- mysql? ( >=dev-db/mysql-3.23 )
- postgres? ( >=dev-db/postgresql-7.4.0 )
- sys-apps/mtx
- )
- X? ( virtual/x11 )
- wxwindows? ( >=x11-libs/wxGTK-2.4.2 )
- virtual/mta
- dev-libs/gmp
- app-text/tetex
- dev-tex/latex2html"
+ readline? ( >=sys-libs/readline-4.1 )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ gnome? ( gnome-base/libgnome )
+ gnome? ( app-admin/gnomesu )
+ !bacula-clientonly? (
+ sqlite? ( =dev-db/sqlite-2* )
+ mysql? ( >=dev-db/mysql-3.23 )
+ postgres? ( >=dev-db/postgresql-7.4.0 )
+ sys-apps/mtx
+ )
+ X? ( virtual/x11 )
+ wxwindows? ( >=x11-libs/wxGTK-2.4.2 )
+ virtual/mta
+ dev-libs/gmp
+ app-text/tetex
+ dev-tex/latex2html"
RDEPEND="${DEPEND}
- !bacula-clientonly? (
- sys-apps/mtx
- app-arch/mt-st
- )"
+ !bacula-clientonly? (
+ sys-apps/mtx
+ app-arch/mt-st
+ )"
src_compile() {
- # this resolves bug #181
- epatch ${FILESDIR}/1.36.2-cdrecord-configure.patch
-
- local myconf=""
-
- myconf="
- `use_enable readline`
- `use_enable gnome`
- `use_enable tcpd tcp-wrappers`
- `use_enable X x`"
-
- # define this to skip building the other daemons ...
- if use bacula-clientonly
- then
- myconf="${myconf} --enable-client-only"
- fi
-
- # select database support
- if ! use bacula-clientonly
- then
- # mysql is the recomended choice ...
- if use mysql
- then
- myconf="${myconf} --with-mysql=/usr"
- elif use postgres
- then
- myconf="${myconf} --with-postgresql=/usr"
- elif use sqlite
- then
- myconf="${myconf} --with-sqlite=/usr"
- elif use sqlite && use mysql
- then
- myconf="${myconf/--with-sqlite/}"
- fi
- fi
-
- if use wxwindows
- then
- myconf="${myconf} --enable-wx-console"
- fi
-
- if use readline
- then
- myconf="${myconf} --enable-readline"
- fi
-
- if use gnome
- then
- myconf="${myconf} --enable-tray-monitor"
- fi
-
- ./configure \
- --enable-smartalloc \
- --prefix=/usr \
- --mandir=/usr/share/man \
- --with-pid-dir=/var/run \
- --sysconfdir=/etc/bacula \
- --infodir=/usr/share/info \
- --with-subsys-dir=/var/lock/subsys \
- --with-working-dir=/var/bacula \
- --with-scriptdir=/etc/bacula \
- --with-dir-user=root \
- --with-dir-group=bacula \
- --with-sd-user=root \
- --with-sd-group=bacula \
- --with-fd-user=root \
- --with-fd-group=bacula \
- --host=${CHOST} ${myconf} || die "bad ./configure"
-
- emake || die "compile problem"
-
- # for the rescue package regardless of use static
- cd ${S}/src/filed
- make static-bacula-fd
- cd ${S}
-
- # make the docs
- cd ${S}/doc/latex
- make
- cd ${S}
-
- if use static
- then
- cd ${S}/src/console
- make static-console
- cd ${S}/src/dird
- make static-bacula-dir
- if use gnome
- then
- cd ${S}/src/gnome-console
- make static-gnome-console
- fi
- if use wxwindows
- then
- cd ${S}/src/wx-console
- make static-wx-console
- fi
- cd ${S}/src/stored
- make static-bacula-sd
- fi
+ # this resolves bug #181
+ epatch ${FILESDIR}/1.36.2-cdrecord-configure.patch
+
+ local myconf=""
+
+ myconf="
+ `use_enable readline`
+ `use_enable gnome`
+ `use_enable tcpd tcp-wrappers`
+ `use_enable X x`"
+
+ # define this to skip building the other daemons ...
+ if use bacula-clientonly
+ then
+ myconf="${myconf} --enable-client-only"
+ fi
+
+ # select database support
+ if ! use bacula-clientonly
+ then
+ # mysql is the recomended choice ...
+ if use mysql
+ then
+ myconf="${myconf} --with-mysql=/usr"
+ elif use postgres
+ then
+ myconf="${myconf} --with-postgresql=/usr"
+ elif use sqlite
+ then
+ myconf="${myconf} --with-sqlite=/usr"
+ elif use sqlite && use mysql
+ then
+ myconf="${myconf/--with-sqlite/}"
+ fi
+ fi
+
+ if use wxwindows
+ then
+ myconf="${myconf} --enable-wx-console"
+ fi
+
+ if use readline
+ then
+ myconf="${myconf} --enable-readline"
+ fi
+
+ if use gnome
+ then
+ myconf="${myconf} --enable-tray-monitor"
+ fi
+
+ ./configure \
+ --enable-smartalloc \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --with-pid-dir=/var/run \
+ --sysconfdir=/etc/bacula \
+ --infodir=/usr/share/info \
+ --with-subsys-dir=/var/lock/subsys \
+ --with-working-dir=/var/bacula \
+ --with-scriptdir=/etc/bacula \
+ --with-dir-user=root \
+ --with-dir-group=bacula \
+ --with-sd-user=root \
+ --with-sd-group=bacula \
+ --with-fd-user=root \
+ --with-fd-group=bacula \
+ --host=${CHOST} ${myconf} || die "bad ./configure"
+
+ emake || die "compile problem"
+
+ # for the rescue package regardless of use static
+ cd ${S}/src/filed
+ make static-bacula-fd
+ cd ${S}
+
+ # make the docs
+ cd ${S}/doc/latex
+ make
+ cd ${S}
+
+ if use static
+ then
+ cd ${S}/src/console
+ make static-console
+ cd ${S}/src/dird
+ make static-bacula-dir
+ if use gnome
+ then
+ cd ${S}/src/gnome-console
+ make static-gnome-console
+ fi
+ if use wxwindows
+ then
+ cd ${S}/src/wx-console
+ make static-wx-console
+ fi
+ cd ${S}/src/stored
+ make static-bacula-sd
+ fi
}
src_install() {
- make DESTDIR=${D} install || die
-
- if use static
- then
- cd ${S}/src/filed
- cp static-bacula-fd ${D}/usr/sbin/bacula-fd
- cd ${S}/src/console
- cp static-console ${D}/usr/sbin/console
- cd ${S}/src/dird
- cp static-bacula-dir ${D}/usr/sbin/bacula-dir
- if use gnome
- then
- cd ${S}/src/gnome-console
- cp static-gnome-console ${D}/usr/sbin/gnome-console
- fi
- if use wxwindows
- then
- cd ${S}/src/wx-console
- cp static-wx-console ${D}/usr/sbin/wx-console
- fi
- cd ${S}/src/stored
- cp static-bacula-sd ${D}/usr/sbin/bacula-sd
- fi
-
- # the menu stuff
- if use gnome
- then
- mkdir -p ${D}/usr/share/pixmaps
- mkdir -p ${D}/usr/share/applications
- cp ${S}/scripts/bacula.png ${D}/usr/share/pixmaps/bacula.png
- cp ${S}/scripts/bacula.desktop.gnome2.xsu ${D}/usr/share/applications/bacula.desktop
- cp ${S}/src/tray-monitor/generic.xpm ${D}/usr/share/pixmaps/bacula-tray-monitor.xpm
- cp ${S}/scripts/bacula-tray-monitor.desktop \
- ${D}/usr/share/applications/bacula-tray-monitor.desktop
- chmod 755 ${D}/usr/sbin/bacula-tray-monitor
- chmod 644 ${D}/etc/bacula/tray-monitor.conf
- fi
-
- if ! use bacula-clientonly
- then
- # the database update scripts
- mkdir -p ${D}/etc/bacula/updatedb
- cp ${S}/updatedb/* ${D}/etc/bacula/updatedb/
- chmod 754 ${D}/etc/bacula/updatedb/*
-
- # the logrotate configuration
- mkdir -p ${D}/etc/logrotate.d
- cp ${S}/scripts/logrotate ${D}/etc/logrotate.d/bacula
- chmod 644 ${D}/etc/logrotate.d/bacula
-
- # the logwatch scripts
- mkdir -p ${D}/etc/log.d/conf/logfiles
- mkdir -p ${D}/etc/log.d/conf/services
- mkdir -p ${D}/etc/log.d/scripts/services
- cp ${S}/scripts/logwatch/bacula ${D}/etc/log.d/scripts/services/bacula
- cp ${S}/scripts/logwatch/logfile.bacula.conf ${D}/etc/log.d/conf/logfiles/bacula.conf
- cp ${S}/scripts/logwatch/services.bacula.conf ${D}/etc/log.d/conf/services/bacula.conf
- chmod 755 ${D}/etc/log.d/scripts/services/bacula
- chmod 644 ${D}/etc/log.d/conf/logfiles/bacula.conf
- chmod 644 ${D}/etc/log.d/conf/services/bacula.conf
-
- fi
-
- # the cdrom rescue package
- mkdir -p ${D}/etc/bacula/rescue/cdrom
- cp -R ${S}/rescue/linux/cdrom/* ${D}/etc/bacula/rescue/cdrom/
- mkdir ${D}/etc/bacula/rescue/cdrom/bin
- cp ${S}/src/filed/static-bacula-fd ${D}/etc/bacula/rescue/cdrom/bin/bacula-fd
- chmod 754 ${D}/etc/bacula/rescue/cdrom/bin/bacula-fd
-
- # documentation
- for a in ${S}/{ChangeLog,README,ReleaseNotes,kernstodo,LICENSE,doc/latex/bacula.pdf}
- do
- dodoc $a
- done
-
- dohtml -r ${S}/doc/latex/bacula
-
- # clean up permissions left broken by install
- chmod o-r ${D}/etc/bacula/query.sql
-
- # remove the working dir so we can add it postinst with group
- rmdir ${D}/var/bacula
-
- # init scripts
- exeinto /etc/init.d
- if use bacula-clientonly
- then
- newexe ${S}/platforms/gentoo/bacula-fd bacula-fd
- else
- if use bacula-split
- then
- newexe ${S}/platforms/gentoo/bacula-fd bacula-fd
- newexe ${S}/platforms/gentoo/bacula-sd bacula-sd
- newexe ${S}/platforms/gentoo/bacula-dir bacula-dir
- else
- newexe ${S}/platforms/gentoo/bacula-init bacula
- fi
- fi
+ make DESTDIR=${D} install || die
+
+ if use static
+ then
+ cd ${S}/src/filed
+ cp static-bacula-fd ${D}/usr/sbin/bacula-fd
+ cd ${S}/src/console
+ cp static-console ${D}/usr/sbin/console
+ cd ${S}/src/dird
+ cp static-bacula-dir ${D}/usr/sbin/bacula-dir
+ if use gnome
+ then
+ cd ${S}/src/gnome-console
+ cp static-gnome-console ${D}/usr/sbin/gnome-console
+ fi
+ if use wxwindows
+ then
+ cd ${S}/src/wx-console
+ cp static-wx-console ${D}/usr/sbin/wx-console
+ fi
+ cd ${S}/src/stored
+ cp static-bacula-sd ${D}/usr/sbin/bacula-sd
+ fi
+
+ # the menu stuff
+ if use gnome
+ then
+ mkdir -p ${D}/usr/share/pixmaps
+ mkdir -p ${D}/usr/share/applications
+ cp ${S}/scripts/bacula.png ${D}/usr/share/pixmaps/bacula.png
+ cp ${S}/scripts/bacula.desktop.gnome2.xsu ${D}/usr/share/applications/bacula.desktop
+ cp ${S}/src/tray-monitor/generic.xpm ${D}/usr/share/pixmaps/bacula-tray-monitor.xpm
+ cp ${S}/scripts/bacula-tray-monitor.desktop \
+ ${D}/usr/share/applications/bacula-tray-monitor.desktop
+ chmod 755 ${D}/usr/sbin/bacula-tray-monitor
+ chmod 644 ${D}/etc/bacula/tray-monitor.conf
+ fi
+
+ if ! use bacula-clientonly
+ then
+ # the database update scripts
+ mkdir -p ${D}/etc/bacula/updatedb
+ cp ${S}/updatedb/* ${D}/etc/bacula/updatedb/
+ chmod 754 ${D}/etc/bacula/updatedb/*
+
+ # the logrotate configuration
+ mkdir -p ${D}/etc/logrotate.d
+ cp ${S}/scripts/logrotate ${D}/etc/logrotate.d/bacula
+ chmod 644 ${D}/etc/logrotate.d/bacula
+
+ # the logwatch scripts
+ mkdir -p ${D}/etc/log.d/conf/logfiles
+ mkdir -p ${D}/etc/log.d/conf/services
+ mkdir -p ${D}/etc/log.d/scripts/services
+ cp ${S}/scripts/logwatch/bacula ${D}/etc/log.d/scripts/services/bacula
+ cp ${S}/scripts/logwatch/logfile.bacula.conf ${D}/etc/log.d/conf/logfiles/bacula.conf
+ cp ${S}/scripts/logwatch/services.bacula.conf ${D}/etc/log.d/conf/services/bacula.conf
+ chmod 755 ${D}/etc/log.d/scripts/services/bacula
+ chmod 644 ${D}/etc/log.d/conf/logfiles/bacula.conf
+ chmod 644 ${D}/etc/log.d/conf/services/bacula.conf
+
+ fi
+
+ # the cdrom rescue package
+ mkdir -p ${D}/etc/bacula/rescue/cdrom
+ cp -R ${S}/rescue/linux/cdrom/* ${D}/etc/bacula/rescue/cdrom/
+ mkdir ${D}/etc/bacula/rescue/cdrom/bin
+ cp ${S}/src/filed/static-bacula-fd ${D}/etc/bacula/rescue/cdrom/bin/bacula-fd
+ chmod 754 ${D}/etc/bacula/rescue/cdrom/bin/bacula-fd
+
+ # documentation
+ for a in ${S}/{ChangeLog,README,ReleaseNotes,kernstodo,LICENSE,doc/latex/bacula.pdf}
+ do
+ dodoc $a
+ done
+
+ dohtml -r ${S}/doc/latex/bacula
+
+ # clean up permissions left broken by install
+ chmod o-r ${D}/etc/bacula/query.sql
+
+ # remove the working dir so we can add it postinst with group
+ rmdir ${D}/var/bacula
+
+ # init scripts
+ exeinto /etc/init.d
+ if use bacula-clientonly
+ then
+ newexe ${S}/platforms/gentoo/bacula-fd bacula-fd
+ else
+ if use bacula-split
+ then
+ newexe ${S}/platforms/gentoo/bacula-fd bacula-fd
+ newexe ${S}/platforms/gentoo/bacula-sd bacula-sd
+ newexe ${S}/platforms/gentoo/bacula-dir bacula-dir
+ else
+ newexe ${S}/platforms/gentoo/bacula-init bacula
+ fi
+ fi
}
pkg_postinst() {
- # create the daemon group
- HAVE_BACULA=`cat /etc/group | grep bacula 2>/dev/null`
- if [ -z $HAVE_BACULA ]; then
- enewgroup bacula
- einfo
- einfo "The group bacula has been created. Any users you add to"
- einfo "this group have access to files created by the daemons."
- fi
-
- # the working directory
- install -m0750 -o root -g bacula -d ${ROOT}/var/bacula
-
- # link installed bacula-fd.conf into rescue directory
- #ln -s /etc/bacula/bacula-fd.conf /etc/bacula/rescue/cdrom/bacula-fd.conf
- # no longer necessary after 1.36.2
-
- einfo
- einfo "The CDRom rescue disk package has been installed into the"
- einfo "/etc/bacula/rescue/cdrom/ directory. Please examine the manual"
- einfo "for information on creating a rescue CD. CDR device detection"
- einfo "during build has been disabled to prevent sandbox violations."
- einfo "You need to examine /etc/bacula/rescue/cdrom/Makefile and adjust"
- einfo "the device information for your CD recorder."
- einfo
-
- if ! use bacula-clientonly; then
- einfo
- einfo "Please note either/or nature of database USE flags for"
- einfo "Bacula. If mysql is set, it will be used, else postgres"
- einfo "else finally SQLite. If you wish to have multiple DBs on"
- einfo "one system, you may wish to unset auxillary DBs for this"
- einfo "build."
- einfo
-
- if use mysql
- then
- # test for an existing database
- # note: this ASSUMES no password has been set for bacula database
- DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
- if [ -z "$DB_VER" ]; then
- einfo "This appears to be a new install and you plan to use mysql"
- einfo "for your catalog database. You should now create it by doing"
- einfo "these commands:"
- einfo " sh /etc/bacula/grant_mysql_privileges"
- einfo " sh /etc/bacula/create_mysql_database"
- einfo " sh /etc/bacula/make_mysql_tables"
- elif [ "$DB_VER" -lt "8" ]; then
- elinfo "This release requires an upgrade to your bacula database"
- einfo "as the database format has changed. Please read the"
- einfo "manual chapter for how to upgrade your database!!!"
- einfo
- einfo "Backup your database with the command:"
- einfo " mysqldump -f --opt bacula | bzip2 > /var/bacula/bacula_backup.sql.bz"
- einfo
- einfo "Then update your database using the scripts found in"
- einfo "/etc/bacula/updatedb/ from your current version $DB_VER to"
- einfo "version 8. Note that scripts must be run in order from your"
- einfo "version to the current version."
- fi
- fi
-
- if use postgres
- then
- # test for an existing database
- # note: this ASSUMES no password has been set for bacula database
- DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
- if [ -z "$DB_VER" ]; then
- einfo "This appears to be a new install and you plan to use postgresql"
- einfo "for your catalog database. You should now create it by doing"
- einfo "these commands:"
- einfo " sh /etc/bacula/create_postgresql_database"
- einfo " sh /etc/bacula/make_postgresql_tables"
- einfo " sh /etc/bacula/grant_postgresql_privileges"
- elif [ "$DB_VER" -lt "8" ]; then
- elinfo "This release requires an upgrade to your bacula database"
- einfo "as the database format has changed. Please read the"
- einfo "manual chapter for how to upgrade your database!!!"
- einfo
- einfo "Backup your database with the command:"
- einfo " pg_dump bacula | bzip2 > /var/bacula/bacula_backup.sql.bz2"
- einfo
- einfo "Then update your database using the scripts found in"
- einfo "/etc/bacula/updatedb/ from your current version $DB_VER to"
- einfo "version 8. Note that scripts must be run in order from your"
- einfo "version to the current version."
- fi
- fi
-
- if use sqlite
- then
- # test for an existing database
- # note: this ASSUMES no password has been set for bacula database
- DB_VER=`echo "select * from Version;" | sqlite 2>/dev/null /var/bacula/bacula.db | tail -n 1`
- if [ -z "$DB_VER" ]; then
- einfo "This appears to be a new install and you plan to use sqlite"
- einfo "for your catalog database. You should now create it by doing"
- einfo "these commands:"
- einfo " sh /etc/bacula/grant_sqlite_privileges"
- einfo " sh /etc/bacula/create_sqlite_database"
- einfo " sh /etc/bacula/make_sqlite_tables"
- elif [ "$DB_VER" -lt "8" ]; then
- elinfo "This release requires an upgrade to your bacula database"
- einfo "as the database format has changed. Please read the"
- einfo "manual chapter for how to upgrade your database!!!"
- einfo
- einfo "Backup your database with the command:"
- einfo " echo .dump | sqlite /var/bacula/bacula.db | bzip2 > \\"
- einfo " /var/bacula/bacula_backup.sql.bz2"
- einfo
- einfo "Then update your database using the scripts found in"
- einfo "/etc/bacula/updatedb/ from your current version $DB_VER to"
- einfo "version 8. Note that scripts must be run in order from your"
- einfo "version to the current version."
- fi
- fi
- fi
-
- einfo
- einfo "Review your configuration files in /etc/bacula and"
- einfo "start the daemons:"
- if use bacula-clientonly; then
- einfo " /etc/init.d/bacula-fd start"
- else
- if use bacula-split; then
- einfo " /etc/init.d/bacula-sd start"
- einfo " /etc/init.d/bacula-dir start"
- einfo " /etc/init.d/bacula-fd start"
- einfo " or /etc/bacula/bacula will start all three."
- else
- einfo " /etc/init.d/bacula start"
- fi
- fi
- einfo
- einfo "You may also wish to:"
- if use bacula-clientonly; then
- einfo " rc-update add bacula-fd default"
- else
- if use bacula-split; then
- einfo " rc-update add bacula-sd default"
- einfo " rc-update add bacula-dir default"
- einfo " rc-update add bacula-fd default"
- else
- einfo " rc-update add bacula default"
- fi
- fi
- einfo
+ # create the daemon group
+ HAVE_BACULA=`cat /etc/group | grep bacula 2>/dev/null`
+ if [ -z $HAVE_BACULA ]; then
+ enewgroup bacula
+ einfo
+ einfo "The group bacula has been created. Any users you add to"
+ einfo "this group have access to files created by the daemons."
+ fi
+
+ # the working directory
+ install -m0750 -o root -g bacula -d ${ROOT}/var/bacula
+
+ # link installed bacula-fd.conf into rescue directory
+ #ln -s /etc/bacula/bacula-fd.conf /etc/bacula/rescue/cdrom/bacula-fd.conf
+ # no longer necessary after 1.36.2
+
+ einfo
+ einfo "The CDRom rescue disk package has been installed into the"
+ einfo "/etc/bacula/rescue/cdrom/ directory. Please examine the manual"
+ einfo "for information on creating a rescue CD. CDR device detection"
+ einfo "during build has been disabled to prevent sandbox violations."
+ einfo "You need to examine /etc/bacula/rescue/cdrom/Makefile and adjust"
+ einfo "the device information for your CD recorder."
+ einfo
+
+ if ! use bacula-clientonly; then
+ einfo
+ einfo "Please note either/or nature of database USE flags for"
+ einfo "Bacula. If mysql is set, it will be used, else postgres"
+ einfo "else finally SQLite. If you wish to have multiple DBs on"
+ einfo "one system, you may wish to unset auxillary DBs for this"
+ einfo "build."
+ einfo
+
+ if use mysql
+ then
+ # test for an existing database
+ # note: this ASSUMES no password has been set for bacula database
+ DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
+ if [ -z "$DB_VER" ]; then
+ einfo "This appears to be a new install and you plan to use mysql"
+ einfo "for your catalog database. You should now create it by doing"
+ einfo "these commands:"
+ einfo " sh /etc/bacula/grant_mysql_privileges"
+ einfo " sh /etc/bacula/create_mysql_database"
+ einfo " sh /etc/bacula/make_mysql_tables"
+ elif [ "$DB_VER" -lt "8" ]; then
+ elinfo "This release requires an upgrade to your bacula database"
+ einfo "as the database format has changed. Please read the"
+ einfo "manual chapter for how to upgrade your database!!!"
+ einfo
+ einfo "Backup your database with the command:"
+ einfo " mysqldump -f --opt bacula | bzip2 > /var/bacula/bacula_backup.sql.bz"
+ einfo
+ einfo "Then update your database using the scripts found in"
+ einfo "/etc/bacula/updatedb/ from your current version $DB_VER to"
+ einfo "version 8. Note that scripts must be run in order from your"
+ einfo "version to the current version."
+ fi
+ fi
+
+ if use postgres
+ then
+ # test for an existing database
+ # note: this ASSUMES no password has been set for bacula database
+ DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
+ if [ -z "$DB_VER" ]; then
+ einfo "This appears to be a new install and you plan to use postgresql"
+ einfo "for your catalog database. You should now create it by doing"
+ einfo "these commands:"
+ einfo " sh /etc/bacula/create_postgresql_database"
+ einfo " sh /etc/bacula/make_postgresql_tables"
+ einfo " sh /etc/bacula/grant_postgresql_privileges"
+ elif [ "$DB_VER" -lt "8" ]; then
+ elinfo "This release requires an upgrade to your bacula database"
+ einfo "as the database format has changed. Please read the"
+ einfo "manual chapter for how to upgrade your database!!!"
+ einfo
+ einfo "Backup your database with the command:"
+ einfo " pg_dump bacula | bzip2 > /var/bacula/bacula_backup.sql.bz2"
+ einfo
+ einfo "Then update your database using the scripts found in"
+ einfo "/etc/bacula/updatedb/ from your current version $DB_VER to"
+ einfo "version 8. Note that scripts must be run in order from your"
+ einfo "version to the current version."
+ fi
+ fi
+
+ if use sqlite
+ then
+ # test for an existing database
+ # note: this ASSUMES no password has been set for bacula database
+ DB_VER=`echo "select * from Version;" | sqlite 2>/dev/null /var/bacula/bacula.db | tail -n 1`
+ if [ -z "$DB_VER" ]; then
+ einfo "This appears to be a new install and you plan to use sqlite"
+ einfo "for your catalog database. You should now create it by doing"
+ einfo "these commands:"
+ einfo " sh /etc/bacula/grant_sqlite_privileges"
+ einfo " sh /etc/bacula/create_sqlite_database"
+ einfo " sh /etc/bacula/make_sqlite_tables"
+ elif [ "$DB_VER" -lt "8" ]; then
+ elinfo "This release requires an upgrade to your bacula database"
+ einfo "as the database format has changed. Please read the"
+ einfo "manual chapter for how to upgrade your database!!!"
+ einfo
+ einfo "Backup your database with the command:"
+ einfo " echo .dump | sqlite /var/bacula/bacula.db | bzip2 > \\"
+ einfo " /var/bacula/bacula_backup.sql.bz2"
+ einfo
+ einfo "Then update your database using the scripts found in"
+ einfo "/etc/bacula/updatedb/ from your current version $DB_VER to"
+ einfo "version 8. Note that scripts must be run in order from your"
+ einfo "version to the current version."
+ fi
+ fi
+ fi
+
+ einfo
+ einfo "Review your configuration files in /etc/bacula and"
+ einfo "start the daemons:"
+ if use bacula-clientonly; then
+ einfo " /etc/init.d/bacula-fd start"
+ else
+ if use bacula-split; then
+ einfo " /etc/init.d/bacula-sd start"
+ einfo " /etc/init.d/bacula-dir start"
+ einfo " /etc/init.d/bacula-fd start"
+ einfo " or /etc/bacula/bacula will start all three."
+ else
+ einfo " /etc/init.d/bacula start"
+ fi
+ fi
+ einfo
+ einfo "You may also wish to:"
+ if use bacula-clientonly; then
+ einfo " rc-update add bacula-fd default"
+ else
+ if use bacula-split; then
+ einfo " rc-update add bacula-sd default"
+ einfo " rc-update add bacula-dir default"
+ einfo " rc-update add bacula-fd default"
+ else
+ einfo " rc-update add bacula default"
+ fi
+ fi
+ einfo
}
#
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+#
# This file is used as the template to create the
# Makefile for the Debian GNU Hurd specific installation.
#
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon on Debian GNU Hurd systems.
#
fi
fi
+RETVAL=0
case "$1" in
start)
echo -n "Starting ${DESC}: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon on Debian GNU Hurd systems.
#
fi
fi
+RETVAL=0
case "$1" in
start)
echo -n "Starting ${DESC}: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2008-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon on Debian GNU Hurd systems.
#
fi
fi
+RETVAL=0
case "$1" in
start)
echo -n "Starting ${DESC}: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
#
# This file is used as the template to create the
# Makefile for the Solaris specific installation.
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon
#
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
-exit 0
+exit $RETVAL
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula File daemon.
#
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
#
+RETVAL=0
case "$1" in
'start')
echo "Starting the Bacula File daemon: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
-exit 0
+exit $RETVAL
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Storage daemon.
#
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
#
+RETVAL=0
case "$1" in
start)
echo "Starting the Bacula Storage daemon: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
-exit 0
+exit $RETVAL
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
#
# This file is used as the template to create the
# Makefile for the Mandrake specific installation.
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon
#
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
status)
status @sbindir@/bacula-dir
exit 1
;;
esac
-exit 0
+exit $RETVAL
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula File daemon.
#
# Source function library
. /etc/rc.d/init.d/functions
+RETVAL=0
case "$1" in
start)
echo -n "Starting the Bacula File daemon: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
status)
status @sbindir@/bacula-fd
exit 1
;;
esac
-exit 0
+exit $RETVAL
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Storage daemon.
#
# Source function library
. /etc/rc.d/init.d/functions
+RETVAL=0
case "$1" in
start)
echo -n "Starting the Bacula Storage daemon: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
status)
status @sbindir@/bacula-sd
exit 1
;;
esac
-exit 0
+exit $RETVAL
Version: %{version}
Release: %{release}
Group: Archiving/Backup
-License: GPL
+License: BSD 2-Clause
Source: http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.bz2
Source1: %{name}-icons.tar.bz2
BuildRoot: %{_tmppath}/%{name}-root
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
#
# This file is used as the template to create the
# Makefile for the Solaris specific installation.
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon
#
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
-exit 0
+exit $RETVAL
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula File daemon.
#
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
#
+RETVAL=0
case "$1" in
start)
echo "Starting the Bacula File daemon: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
-exit 0
+exit $RETVAL
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Storage daemon.
#
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
#
+RETVAL=0
case "$1" in
start)
echo "Starting the Bacula Storage daemon: "
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
-exit 0
+exit $RETVAL
#
+# Copyright (C) Kern Sibbald 2009-2015
+# License: BSD 2-Clause
+#
# This is the makefile template for the platform directory
# which contains general platform installation.
#
# 17 August 2009 -- Lorenz Schori
#
-# for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+# for Bacula Enterprise release @VERSION@ (@DATE@) -- @DISTNAME@
#
BACULA_WORKING_DIR:=/private/var/bacula/working
BACULA_PMDOC:=${WORKING_DIR}/installer.pmdoc
-# Detect whether we sit inside the bacula source tree. In this case we won't
-# download the tar from sourceforge but instead work with what its there
+# Detect whether we sit inside the Bacula source tree. In this case we won't
+# download the tar from sourceforge but instead work with what is there
# already
CURSUB:=$(CURDIR:%/platforms/osx=%)
ifneq ($(CURDIR),$(CURSUB))
# BACULA_VERSION:=$(shell sed -n 's,^VERSION=,,p' $(CURSUB)/autoconf/Make.common)
endif
-PACKAGE_TITLE:=Bacula File Daemon ${BACULA_VERSION}
-PACKAGE_ID:=org.bacula.bacula-fd.pkg
+PACKAGE_TITLE:=Bacula Enterprise File Daemon ${BACULA_VERSION}
+PACKAGE_ID:=com.baculasystems.bacula-fd.pkg
PACKAGE_DIR:=${PRODUCTS_DIR}/${PACKAGE_TITLE}
PACKAGE_BUNDLE:=${PACKAGE_DIR}/${PACKAGE_TITLE}.pkg
PACKAGE_DMG:=${PRODUCTS_DIR}/${PACKAGE_TITLE}.dmg
PACKAGE_XRESOURCES:=postflight preupgrade
# Flags for the toolchain
-CONFIGFLAGS:=--enable-client-only --prefix=${BACULA_PREFIX} \
- --with-dir-password=@DIR_PW@ --with-fd-password=@FD_PW@ \
- --with-sd-password=@SD_PW@ --with-mon-dir-password=@MON_DIR_PW@ \
- --with-mon-fd-password=@MON_FD_PW@ --with-mon-sd-password=@MON_SD_PW@ \
- --with-basename=@BASENAME@ --with-hostname=@HOSTNAME@ \
- --with-working-dir=${BACULA_WORKING_DIR}
+CONFIGFLAGS:= \
+ --enable-client-only \
+ --prefix=${BACULA_PREFIX} \
+ --with-dir-password=@DIR_PW@ \
+ --with-fd-password=@FD_PW@ \
+ --with-sd-password=@SD_PW@ \
+ --with-mon-dir-password=@MON_DIR_PW@ \
+ --with-mon-fd-password=@MON_FD_PW@ \
+ --with-mon-sd-password=@MON_SD_PW@ \
+ --with-basename=@BASENAME@ \
+ --with-hostname=@HOSTNAME@ \
+ --with-working-dir=${BACULA_WORKING_DIR}
CPPFLAGS:=-isysroot ${MACOSX_SDK_SYSROOT} ${MACOSX_VERSION_FLAGS}
CFLAGS:=-O -g ${ARCHFLAGS}
CXXFLAGS:=${CFLAGS}
done
mkdir -p "${BACULA_DESTDIR}${BACULA_PREFIX}/Library/LaunchDaemons"
- sed ${INFILE_SUBST} files/org.bacula.bacula-fd.plist.in \
- > "${BACULA_DESTDIR}${BACULA_PREFIX}/Library/LaunchDaemons/org.bacula.bacula-fd.plist"
+ sed ${INFILE_SUBST} files/com.baculasystems.bacula-fd.plist.in \
+ > "${BACULA_DESTDIR}${BACULA_PREFIX}/Library/LaunchDaemons/com.baculasystems.bacula-fd.plist"
${BACULA_SOURCE}: ${BACULA_TAR}
mkdir -p "${WORKING_DIR}"
.PHONY: clean
clean:
rm -rf "${BUILD_DIR}" "${PACKAGE_DIR}" "${PACKAGE_DMG}"
-
===============================================
This package build script lets you download, compile and package the bacula
-file daemon easily with a single command line. Beside the bacula file daemon
+file daemon easily with a single command line. In addition to the Bacula file daemon
the resulting installer package contains a short ReadMe file with instructions
on how to install and use the software. Also a basic launchd property list is
-included along with preugrade and postflight installer scripts to stop and
+included along with preupgrade and postflight installer scripts to stop and
restart the daemon while upgrading. To ensure the security of the users the
passwords in the configuration files are generated during a first time
installation and file permissions are checked and corrected on upgrades.
* Mac OS X 10.5 or later (building/packaging), 10.4 or later (deployment)
* Mac OS X developer tools installed
-Example (compile and create package from within bacula source tree):
+Example (compile and create package from within Bacula source tree):
$ ./configure --enable-client-only
$ make -C platforms/osx
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
#
# This file is used as the template to create the
# Makefile for the RedHat specific installation.
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon
#
# Source function library
. /etc/rc.d/init.d/functions
+DAEMON_OPTIONS=''
+DAEMON_USER='yes'
DIR_USER=@dir_user@
DIR_GROUP=@dir_group@
DIR_OPTIONS=''
export LD_ASSUME_KERNEL=2.4.19
fi
-# pull in any user defined DIR_DIR_OPTIONS, DIR_USER, or DIR_GROUP
+# pull in any user defined DIR_DIR_OPTIONS, DIR_USER, DIR_GROUP or DAEMON_USER
[ -f /etc/sysconfig/bacula ] && . /etc/sysconfig/bacula
#
if [ "${DIR_GROUP}" != '' ]; then
DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
fi
+
+ if [ "${DAEMON_USER}" != '' -a "${DIR_USER}" != '' ]; then
+ DIR_OPTIONS=""
+ if [ "${DIR_GROUP}" != '' ]; then
+ chown ${DIR_USER}:${DIR_GROUP} @working_dir@/bacula-dir* 2> /dev/null
+ else
+ chown ${DIR_USER} @working_dir@/bacula-dir* 2> /dev/null
+ fi
+ DAEMON_OPTIONS="--user ${DIR_USER}"
+ fi
echo -n "Starting Bacula Director services: "
- daemon @sbindir@/bacula-dir $2 ${DIR_OPTIONS} -c @sysconfdir@/bacula-dir.conf
+ daemon $DAEMON_OPTIONS @sbindir@/bacula-dir $2 ${DIR_OPTIONS} -c @sysconfdir@/bacula-dir.conf
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-dir
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
status)
status @sbindir@/bacula-dir
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula File daemon.
#
# Source function library
. /etc/rc.d/init.d/functions
+DAEMON_OPTIONS=''
+DAEMON_USER='yes'
FD_USER=@fd_user@
FD_GROUP=@fd_group@
FD_OPTIONS=''
if [ "${FD_GROUP}" != '' ]; then
FD_OPTIONS="${FD_OPTIONS} -g ${FD_GROUP}"
fi
+
+ if [ "${DAEMON_USER}" != '' -a "${FD_USER}" != '' ]; then
+ FD_OPTIONS=""
+ if [ "${FD_GROUP}" != '' ]; then
+ chown ${FD_USER}:${FD_GROUP} @working_dir@/bacula-fd* 2> /dev/null
+ else
+ chown ${FD_USER} @working_dir@/bacula-fd* 2> /dev/null
+ fi
+ DAEMON_OPTIONS="--user ${FD_USER}"
+ fi
+
echo -n "Starting Bacula File services: "
- daemon @sbindir@/bacula-fd $2 ${FD_OPTIONS} -c @sysconfdir@/bacula-fd.conf
+ daemon ${DAEMON_OPTIONS} @sbindir@/bacula-fd $2 ${FD_OPTIONS} -c @sysconfdir@/bacula-fd.conf
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
status)
status @sbindir@/bacula-fd
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Storage daemon.
#
# Source function library
. /etc/rc.d/init.d/functions
+DAEMON_OPTIONS=''
+DAEMON_USER=yes
SD_USER=@sd_user@
SD_GROUP=@sd_group@
SD_OPTIONS=''
export LD_ASSUME_KERNEL=2.4.19
fi
-# pull in any user defined SD_OPTIONS, SD_USER, or SD_GROUP
+# pull in any user defined SD_OPTIONS, SD_USER, SD_GROUP or DAEMON_USER
[ -f /etc/sysconfig/bacula ] && . /etc/sysconfig/bacula
#
if [ "${SD_GROUP}" != '' ]; then
SD_OPTIONS="${SD_OPTIONS} -g ${SD_GROUP}"
fi
-
+
+ if [ "${DAEMON_USER}" != '' -a "${SD_USER}" != '' ]; then
+ SD_OPTIONS=""
+ if [ "${SD_GROUP}" != '' ]; then
+ chown ${SD_USER}:${SD_GROUP} @working_dir@/bacula-sd* 2> /dev/null
+ else
+ chown ${SD_USER} @working_dir@/bacula-sd* 2> /dev/null
+ fi
+ DAEMON_OPTIONS="--user ${SD_USER}"
+ fi
+
echo -n "Starting Bacula Storage services: "
- daemon @sbindir@/bacula-sd $2 ${SD_OPTIONS} -c @sysconfdir@/bacula-sd.conf
+ daemon $DAEMON_OPTIONS @sbindir@/bacula-sd $2 ${SD_OPTIONS} -c @sysconfdir@/bacula-sd.conf
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-sd
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
status)
status @sbindir@/bacula-sd
+#
+# Copyright (C) Kern Sibbald 2003-2015
+# License: BSD 2-Clause
#
# This file is used as the template to create the
# Makefile for the Slackware specific installation.
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
-# the bacula daemons.
+# the bacula daemons.
#
# This is pretty much watered down version of the RedHat script
# that works on Solaris as well as Linux, but it won't work everywhere.
RC=0
# Test syntax.
if [ $# = 0 ]; then
- echo "Usage: killproc {program} [signal]"
- return 1
+ echo "Usage: killproc {program} [signal]"
+ return 1
fi
notset=0
# check for third arg to be kill level
if [ "$3" != "" ] ; then
- killlevel=$3
+ killlevel=$3
else
- notset=1
- killlevel="-9"
+ notset=1
+ killlevel="-9"
fi
# Get base program name
# Kill it.
if [ "$pid" != "" ] ; then
- if [ "$notset" = "1" ] ; then
- if ps -p $pid>/dev/null 2>&1; then
- # TERM first, then KILL if not dead
- kill -TERM $pid 2>/dev/null
- sleep 1
- if ps -p $pid >/dev/null 2>&1 ; then
- sleep 1
- if ps -p $pid >/dev/null 2>&1 ; then
- sleep 3
- if ps -p $pid >/dev/null 2>&1 ; then
- kill -KILL $pid 2>/dev/null
- fi
- fi
- fi
- fi
- ps -p $pid >/dev/null 2>&1
- RC=$?
- [ $RC -eq 0 ] && failure "$base shutdown" || success "$base shutdown"
- # RC=$((! $RC))
- # use specified level only
- else
- if ps -p $pid >/dev/null 2>&1; then
- kill $killlevel $pid 2>/dev/null
- RC=$?
- [ $RC -eq 0 ] && success "$base $killlevel" || failure "$base $killlevel"
- fi
- fi
+ if [ "$notset" = "1" ] ; then
+ if ps -p $pid>/dev/null 2>&1; then
+ # TERM first, then KILL if not dead
+ kill -TERM $pid 2>/dev/null
+ sleep 1
+ if ps -p $pid >/dev/null 2>&1 ; then
+ sleep 1
+ if ps -p $pid >/dev/null 2>&1 ; then
+ sleep 3
+ if ps -p $pid >/dev/null 2>&1 ; then
+ kill -KILL $pid 2>/dev/null
+ fi
+ fi
+ fi
+ fi
+ ps -p $pid >/dev/null 2>&1
+ RC=$?
+ [ $RC -eq 0 ] && failure "$base shutdown" || success "$base shutdown"
+ # RC=$((! $RC))
+ # use specified level only
+ else
+ if ps -p $pid >/dev/null 2>&1; then
+ kill $killlevel $pid 2>/dev/null
+ RC=$?
+ [ $RC -eq 0 ] && success "$base $killlevel" || failure "$base $killlevel"
+ fi
+ fi
else
- failure "$base shutdown"
+ failure "$base shutdown"
fi
# Remove pid file if any.
if [ "$notset" = "1" ]; then
- rm -f ${PIDDIR}/$base.$2.pid
+ rm -f ${PIDDIR}/$base.$2.pid
fi
return $RC
}
pid=""
# Test syntax.
if [ $# = 0 ] ; then
- echo "Usage: pidofproc {program}"
- return 1
+ echo "Usage: pidofproc {program}"
+ return 1
fi
# Get base program name
# First try PID file
if [ -f ${PIDDIR}/$base.$2.pid ] ; then
- pid=`head -1 ${PIDDIR}/$base.$2.pid`
- if [ "$pid" != "" ] ; then
- echo $pid
- return 0
- fi
+ pid=`head -1 ${PIDDIR}/$base.$2.pid`
+ if [ "$pid" != "" ] ; then
+ echo $pid
+ return 0
+ fi
fi
# Next try "pidof"
status() {
# Test syntax.
if [ $# = 0 ] ; then
- echo "Usage: status {program}"
- return 1
+ echo "Usage: status {program}"
+ return 1
fi
# Get base program name
return 0
else
pid=`${PSCMD} | awk 'BEGIN { prog=ARGV[1]; ARGC=1 }
- { if ((prog == $2) || (("(" prog ")") == $2) ||
- (("[" prog "]") == $2) ||
- ((prog ":") == $2)) { print $1 ; exit 0 } }' $1`
+ { if ((prog == $2) || (("(" prog ")") == $2) ||
+ (("[" prog "]") == $2) ||
+ ((prog ":") == $2)) { print $1 ; exit 0 } }' $1`
if [ "$pid" != "" ] ; then
- echo "$base (pid $pid) is running..."
- return 0
+ echo "$base (pid $pid) is running..."
+ return 0
fi
fi
# Next try the PID files
if [ -f ${PIDDIR}/$base.$2.pid ] ; then
- pid=`head -1 ${PIDDIR}/$base.$2.pid`
- if [ "$pid" != "" ] ; then
- echo "$base not running, but pid file exists"
- return 1
- fi
+ pid=`head -1 ${PIDDIR}/$base.$2.pid`
+ if [ "$pid" != "" ] ; then
+ echo "$base not running, but pid file exists"
+ return 1
+ fi
fi
# See if the subsys lock exists
if [ -f ${SUBSYSDIR}/$base ] ; then
- echo "$base not running, but subsys locked"
- return 2
+ echo "$base not running, but subsys locked"
+ return 2
fi
echo "$base is stopped"
return 3
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
-# the bacula Director daemon
+# the bacula Director daemon
#
# chkconfig: 2345 92 99
# description: The Leading Open Source Backup Solution.
# Source function library
. /etc/rc.d/functions.bacula
+RETVAL=0
case "$1" in
start)
- [ -x ${BACDIRBIN}/bacula-dir ] && {
- sleep 2
- echo -n "Starting the Director daemon: "
- OPTIONS=''
- if [ "${DIR_USER}" != '' ]; then
- OPTIONS="${OPTIONS} -u ${DIR_USER}"
- fi
+ [ -x ${BACDIRBIN}/bacula-dir ] && {
+ sleep 2
+ echo -n "Starting the Director daemon: "
+ OPTIONS=''
+ if [ "${DIR_USER}" != '' ]; then
+ OPTIONS="${OPTIONS} -u ${DIR_USER}"
+ fi
- if [ "${DIR_GROUP}" != '' ]; then
- OPTIONS="${OPTIONS} -g ${DIR_GROUP}"
- fi
+ if [ "${DIR_GROUP}" != '' ]; then
+ OPTIONS="${OPTIONS} -g ${DIR_GROUP}"
+ fi
- ${BACDIRBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf
- echo Done.
- }
- ;;
+ ${BACDIRBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf
+ RETVAL=$?
+ echo Done.
+ }
+ ;;
stop)
- [ -x ${BACDIRBIN}/bacula-dir ] && {
- echo -n "Stopping the Director daemon: "
- killproc ${BACDIRBIN}/bacula-dir ${DIR_PORT}
- echo Done.
- }
- ;;
+ [ -x ${BACDIRBIN}/bacula-dir ] && {
+ echo -n "Stopping the Director daemon: "
+ killproc ${BACDIRBIN}/bacula-dir ${DIR_PORT}
+ RETVAL=$?
+ echo Done.
+ }
+ ;;
restart)
- $0 stop
- sleep 5
- $0 start
- ;;
+ $0 stop
+ sleep 5
+ $0 start
+ RETVAL=$?
+ ;;
status)
- [ -x ${BACDIRBIN}/bacula-dir ] && status ${BACDIRBIN}/bacula-dir ${DIR_PORT}
- ;;
+ [ -x ${BACDIRBIN}/bacula-dir ] && status ${BACDIRBIN}/bacula-dir ${DIR_PORT}
+ RETVAL=$?
+ ;;
*)
- echo "Usage: $0 {start|stop|restart|status}"
- exit 1
- ;;
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+ ;;
esac
-exit 0
+exit $RETVAL
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
-# the bacula File daemon.
+# the bacula File daemon.
#
# chkconfig: 2345 91 99
# description: The Leading Open Source Backup Solution.
# Source function library
. /etc/rc.d/functions.bacula
+RETVAL=0
case "$1" in
start)
- [ -x ${BACFDBIN}/bacula-fd ] && {
- sleep 2
- echo -n "Starting the File daemon: "
- OPTIONS=''
- if [ "${FD_USER}" != '' ]; then
- OPTIONS="${OPTIONS} -u ${FD_USER}"
- fi
+ [ -x ${BACFDBIN}/bacula-fd ] && {
+ sleep 2
+ echo -n "Starting the File daemon: "
+ OPTIONS=''
+ if [ "${FD_USER}" != '' ]; then
+ OPTIONS="${OPTIONS} -u ${FD_USER}"
+ fi
- if [ "${FD_GROUP}" != '' ]; then
- OPTIONS="${OPTIONS} -g ${FD_GROUP}"
- fi
+ if [ "${FD_GROUP}" != '' ]; then
+ OPTIONS="${OPTIONS} -g ${FD_GROUP}"
+ fi
- ${BACFDBIN}/bacula-fd $2 ${OPTIONS} -v -c ${BACFDCFG}/bacula-fd.conf
- echo Done.
- }
- ;;
+ ${BACFDBIN}/bacula-fd $2 ${OPTIONS} -v -c ${BACFDCFG}/bacula-fd.conf
+ RETVAL=$?
+ echo Done.
+ }
+ ;;
stop)
- [ -x ${BACFDBIN}/bacula-fd ] && {
- echo -n "Stopping the File daemon: "
- killproc ${BACFDBIN}/bacula-fd ${FD_PORT}
- echo Done.
- }
- ;;
+ [ -x ${BACFDBIN}/bacula-fd ] && {
+ echo -n "Stopping the File daemon: "
+ killproc ${BACFDBIN}/bacula-fd ${FD_PORT}
+ RETVAL=$?
+ echo Done.
+ }
+ ;;
restart)
- $0 stop
- sleep 5
- $0 start
- ;;
+ $0 stop
+ sleep 5
+ $0 start
+ RETVAL=$?
+ ;;
status)
- [ -x ${BACFDBIN}/bacula-fd ] && status ${BACFDBIN}/bacula-fd ${FD_PORT}
- ;;
+ [ -x ${BACFDBIN}/bacula-fd ] && status ${BACFDBIN}/bacula-fd ${FD_PORT}
+ RETVAL=$?
+ ;;
*)
- echo "Usage: $0 {start|stop|restart|status}"
- exit 1
- ;;
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+ ;;
esac
-exit 0
+exit $RETVAL
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
-# the bacula Storage daemon.
+# the bacula Storage daemon.
#
# chkconfig: 2345 90 99
# description: The Leading Open Source Backup Solution.
# Source function library
. /etc/rc.d/functions.bacula
+RETVAL=0
case "$1" in
start)
- [ -x ${BACSDBIN}/bacula-sd ] && {
- sleep 2
- echo -n "Starting the Storage daemon: "
- OPTIONS=''
- if [ "${SD_USER}" != '' ]; then
- OPTIONS="${OPTIONS} -u ${SD_USER}"
- fi
+ [ -x ${BACSDBIN}/bacula-sd ] && {
+ sleep 2
+ echo -n "Starting the Storage daemon: "
+ OPTIONS=''
+ if [ "${SD_USER}" != '' ]; then
+ OPTIONS="${OPTIONS} -u ${SD_USER}"
+ fi
- if [ "${SD_GROUP}" != '' ]; then
- OPTIONS="${OPTIONS} -g ${SD_GROUP}"
- fi
+ if [ "${SD_GROUP}" != '' ]; then
+ OPTIONS="${OPTIONS} -g ${SD_GROUP}"
+ fi
- ${BACSDBIN}/bacula-sd $2 ${OPTIONS} -v -c ${BACSDCFG}/bacula-sd.conf
- echo Done.
- }
- ;;
+ ${BACSDBIN}/bacula-sd $2 ${OPTIONS} -v -c ${BACSDCFG}/bacula-sd.conf
+ RETVAL=$?
+ echo Done.
+ }
+ ;;
stop)
- [ -x ${BACSDBIN}/bacula-sd ] && {
- echo -n "Stopping the Storage daemon: "
- killproc ${BACSDBIN}/bacula-sd ${SD_PORT}
- echo Done.
- }
- ;;
+ [ -x ${BACSDBIN}/bacula-sd ] && {
+ echo -n "Stopping the Storage daemon: "
+ killproc ${BACSDBIN}/bacula-sd ${SD_PORT}
+ RETVAL=$?
+ echo Done.
+ }
+ ;;
restart)
- $0 stop
- sleep 5
- $0 start
- ;;
+ $0 stop
+ sleep 5
+ $0 start
+ RETVAL=$?
+ ;;
status)
- [ -x ${BACSDBIN}/bacula-sd ] && status ${BACSDBIN}/bacula-sd ${SD_PORT}
- ;;
+ [ -x ${BACSDBIN}/bacula-sd ] && status ${BACSDBIN}/bacula-sd ${SD_PORT}
+ RETVAL=$?
+ ;;
*)
- echo "Usage: $0 {start|stop|restart|status}"
- exit 1
- ;;
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+ ;;
esac
-exit 0
-
+exit $RETVAL
+#
+# Copyright (C) Kern Sibbald 2001-2015
+# License: BSD 2-Clause
#
# This file is used as the template to create the
# Makefile for the Solaris specific installation.
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DIR = $(INSTALL) -d -m 755
nothing:
install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
-install-autostart-%:
- @rm -f $(DESTDIR)/etc/rc0.d/K20bacula-$*
- @rm -f $(DESTDIR)/etc/rc1.d/S99bacula-$*
- @rm -f $(DESTDIR)/etc/rc2.d/S99bacula-$*
- @$(INSTALL_DIR) $(DESTDIR)/etc/init.d
- @$(INSTALL_DIR) $(DESTDIR)/etc/rc0.d $(DESTDIR)/etc/rc1.d \
- $(DESTDIR)/etc/rc2.d
- @$(INSTALL_PROGRAM) -m 744 bacula-$* $(DESTDIR)/etc/init.d/bacula-$*
+
+install-autostart-fd:
+ @rm -f /etc/rc0.d/K20bacula-fd
+ @rm -f /etc/rc1.d/S99bacula-fd
+ @rm -f /etc/rc2.d/S99bacula-fd
+ @$(INSTALL_PROGRAM) -m 744 bacula-fd /etc/init.d/bacula-fd
+ # set symlinks for script at startup and shutdown
+ @ln -f -s /etc/init.d/bacula-fd /etc/rc0.d/K20bacula-fd
+ @ln -f -s /etc/init.d/bacula-fd /etc/rc1.d/S99bacula-fd
+ @ln -f -s /etc/init.d/bacula-fd /etc/rc2.d/S99bacula-fd
+
+
+install-autostart-sd:
+ @rm -f /etc/rc0.d/K20bacula-sd
+ @rm -f /etc/rc1.d/S99bacula-sd
+ @rm -f /etc/rc2.d/S99bacula-sd
+ @$(INSTALL_PROGRAM) -m 744 bacula-sd /etc/init.d/bacula-sd
# set symlinks for script at startup and shutdown
- @ln -f -s /etc/init.d/bacula-$* $(DESTDIR)/etc/rc0.d/K20bacula-$*
- @ln -f -s /etc/init.d/bacula-$* $(DESTDIR)/etc/rc1.d/S99bacula-$*
- @ln -f -s /etc/init.d/bacula-$* $(DESTDIR)/etc/rc2.d/S99bacula-$*
+ @ln -f -s /etc/init.d/bacula-sd /etc/rc0.d/K20bacula-sd
+ @ln -f -s /etc/init.d/bacula-sd /etc/rc1.d/S99bacula-sd
+ @ln -f -s /etc/init.d/bacula-sd /etc/rc2.d/S99bacula-sd
+
+
+install-autostart-dir:
+ @rm -f /etc/rc0.d/K20bacula-dir
+ @rm -f /etc/rc1.d/S99bacula-dir
+ @rm -f /etc/rc2.d/S99bacula-dir
+ @$(INSTALL_PROGRAM) -m 744 bacula-dir /etc/init.d/bacula-dir
+ # set symlinks for script at startup and shutdown
+ @ln -f -s /etc/init.d/bacula-dir /etc/rc0.d/K20bacula-dir
+ @ln -f -s /etc/init.d/bacula-dir /etc/rc1.d/S99bacula-dir
+ @ln -f -s /etc/init.d/bacula-dir /etc/rc2.d/S99bacula-dir
+
uninstall: uninstall-autostart
uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir
-uninstall-autostart-%:
- @rm -f $(DESTDIR)/etc/rc0.d/K20bacula-$*
- @rm -f $(DESTDIR)/etc/rc1.d/S99bacula-$*
- @rm -f $(DESTDIR)/etc/rc2.d/S99bacula-$*
- @rm -f $(DESTDIR)/etc/init.d/bacula-$*
+uninstall-autostart-fd:
+ @rm -f /etc/rc0.d/K20bacula-fd
+ @rm -f /etc/rc1.d/S99bacula-fd
+ @rm -f /etc/rc2.d/S99bacula-fd
+ @rm -f /etc/init.d/bacula-fd
+
+
+uninstall-autostart-sd:
+ @rm -f /etc/rc0.d/K20bacula-sd
+ @rm -f /etc/rc1.d/S99bacula-sd
+ @rm -f /etc/rc2.d/S99bacula-sd
+ @rm -f /etc/init.d/bacula-sd
+
+uninstall-autostart-dir:
+ @rm -f /etc/rc0.d/K20bacula-dir
+ @rm -f /etc/rc1.d/S99bacula-dir
+ @rm -f /etc/rc2.d/S99bacula-dir
+ @rm -f /etc/init.d/bacula-dir
clean:
@rm -f 1 2 3
#!/bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon
#
case "$1" in
start)
if [ ! -z "${DIR_USER}" ]; then
- [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-u ${DIR_USER}" || \
- DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}"
+ [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-u ${DIR_USER}" || \
+ DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}"
fi
if [ ! -z "${DIR_GROUP}" ]; then
- [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-g ${DIR_GROUP}" || \
- DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
+ [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-g ${DIR_GROUP}" || \
+ DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
fi
echo "Starting the Bacula Director: "
stop)
echo "Stopping the Director daemon: "
if [ -x /usr/bin/zonename ]; then
- case `/usr/bin/zonename` in
- global)
- pkill -z global -x bacula-dir
- ;;
- *)
- pkill -x bacula-dir
- ;;
- esac
+ case `/usr/bin/zonename` in
+ global)
+ pkill -z global -x bacula-dir
+ ;;
+ *)
+ pkill -x bacula-dir
+ ;;
+ esac
else
- pkill -x bacula-dir
+ pkill -x bacula-dir
fi
;;
restart)
#!/bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula File daemon.
#
case "$1" in
start)
if [ ! -z "${DIR_USER}" ]; then
- [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-u ${DIR_USER}" || \
- DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}"
+ [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-u ${DIR_USER}" || \
+ DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}"
fi
if [ ! -z "${DIR_GROUP}" ]; then
- [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-g ${DIR_GROUP}" || \
- DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
+ [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-g ${DIR_GROUP}" || \
+ DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
fi
echo "Starting the Bacula File daemon: "
stop)
echo "Stopping the Bacula File daemon: "
if [ -x /usr/bin/zonename ]; then
- case `/usr/bin/zonename` in
- global)
- pkill -z global -x bacula-fd
- ;;
- *)
- pkill -x bacula-fd
- ;;
- esac
+ case `/usr/bin/zonename` in
+ global)
+ pkill -z global -x bacula-fd
+ ;;
+ *)
+ pkill -x bacula-fd
+ ;;
+ esac
else
- pkill -x bacula-fd
+ pkill -x bacula-fd
fi
;;
restart)
#!/bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Storage daemon.
#
case "$1" in
start)
if [ ! -z "${DIR_USER}" ]; then
- [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-u ${DIR_USER}" || \
- DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}"
+ [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-u ${DIR_USER}" || \
+ DIR_OPTIONS="${DIR_OPTIONS} -u ${DIR_USER}"
fi
if [ ! -z "${DIR_GROUP}" ]; then
- [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-g ${DIR_GROUP}" || \
- DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
+ [ -z "${DIR_OPTIONS}" ] && DIR_OPTIONS="-g ${DIR_GROUP}" || \
+ DIR_OPTIONS="${DIR_OPTIONS} -g ${DIR_GROUP}"
fi
echo "Starting the Bacula Storage daemon: "
stop)
echo "Stopping the Bacula Storage daemon: "
if [ -x /usr/bin/zonename ]; then
- case `/usr/bin/zonename` in
- global)
- pkill -z global -x bacula-sd
- ;;
- *)
- pkill -x bacula-sd
- ;;
- esac
+ case `/usr/bin/zonename` in
+ global)
+ pkill -z global -x bacula-sd
+ ;;
+ *)
+ pkill -x bacula-sd
+ ;;
+ esac
else
- pkill -x bacula-sd
+ pkill -x bacula-sd
fi
;;
restart)
+#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
#
# This file is used as the template to create the
# Makefile for the SuSe specific installation.
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Director daemon
#
# description: The Leading Open Source Backup Solution.
#
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
-# Copyright (C) 2011 Free Software Foundation Europe e.V.
# Modified to work on SuSE 1/31/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
# Added rc.status functions 3/13/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
# Added LSB init info 10/14/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
-# Added $remote_fs, add bacula specific daemon user & group Bruno Friedmann <bruno@ioda-net.ch>
#
### BEGIN INIT INFO
# Provides: bacula-dir
-# Required-Start: $local_fs $remote_fs $network
-# Required-Stop: $local_fs $remote_fs $network
-# Default-Start: 3 5
+# Required-Start: $local_fs $network @DEFAULT_DB_TYPE@
+# Required-Stop: $local_fs $network @DEFAULT_DB_TYPE@
+# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: bacula director
# Description: Bacula network backup system director daemon
case "$1" in
start)
echo -n "Starting the Bacula Director: "
- /sbin/startproc @sbindir@/bacula-dir $2 -u @dir_user@ -g @dir_group@ -c @sysconfdir@/bacula-dir.conf
+ /sbin/startproc @sbindir@/bacula-dir $2 -c @sysconfdir@/bacula-dir.conf
RETVAL=$?
rc_status -v
echo
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
status)
/sbin/checkproc @sbindir@/bacula-dir
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula File daemon.
#
# description: The Leading Open Source Backup Solution.
#
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
-# Copyright (C) 2011 Free Software Foundation Europe e.V.
# Modified to work on SuSE 1/31/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
# Added rc.status functions 3/13/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
# Added LSB init info 10/14/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
-# Added $remote_fs, add bacula specific daemon user & group Bruno Friedmann <bruno@ioda-net.ch>
#
### BEGIN INIT INFO
# Provides: bacula-fd
-# Required-Start: $local_fs $remote_fs $network
-# Required-Stop: $local_fs $remote_fs $network
-# Default-Start: 3 5
+# Required-Start: $local_fs $network
+# Required-Stop: $local_fs $network
+# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: bacula file daemon
# Description: Bacula network backup system file daemon
# this gives us funtion rc_status -v to tell us if we succeed or fail
. /etc/rc.status
+RETVAL=0
case "$1" in
start)
echo -n "Starting the Bacula File daemon: "
- /sbin/startproc @sbindir@/bacula-fd $2 -u @fd_user@ -g @fd_group@ -c @sysconfdir@/bacula-fd.conf
+ /sbin/startproc @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf
RETVAL=$?
rc_status -v
echo
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
status)
/sbin/checkproc @sbindir@/bacula-fd
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula Storage daemon.
#
# description: The Leading Open Source Backup Solution.
#
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
-# Copyright (C) 2011 Free Software Foundation Europe e.V.
# Modified to work on SuSE 1/31/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
# Added rc.status functions 3/13/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
# Added LSB init info 10/14/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
-# Added $remote_fs, add bacula specific daemon user & group Bruno Friedmann <bruno@ioda-net.ch>
#
### BEGIN INIT INFO
# Provides: bacula-sd
-# Required-Start: $local_fs $remote_fs $network
-# Required-Stop: $local_fs $remote_fs $network
+# Required-Start: $local_fs $network
+# Required-Stop: $local_fs $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: bacula storage daemon
# this gives us funtion rc_status -v to tell us if we succeed or fail
. /etc/rc.status
+RETVAL=0
case "$1" in
start)
echo -n "Starting the Bacula Storage daemon: "
- /sbin/startproc @sbindir@/bacula-sd $2 -u @sd_user@ -g @sd_group@ -c @sysconfdir@/bacula-sd.conf
+ /sbin/startproc @sbindir@/bacula-sd $2 -c @sysconfdir@/bacula-sd.conf
RETVAL=$?
rc_status -v
echo
$0 stop
sleep 5
$0 start
+ RETVAL=$?
;;
status)
/sbin/checkproc @sbindir@/bacula-sd
#! /bin/sh
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# bacula This shell script takes care of starting and stopping
# the bacula daemons.
#
#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
+#
# This file is used as the template to create the
# Makefile for the systemd specific installation.
#
install: install-dir install-conf install-autostart
-install-dir: $(DESTDIR)/$(SYSTEMD_UNITDIR)
+install-dir:
mkdir -p $(DESTDIR)/$(SYSTEMD_UNITDIR) $(DESTDIR)/$(SYSTEMD_TMPFILES)
install-conf:
install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
+install-service:
+ @$(INSTALL_PROGRAM) -m 644 bacula-fd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)
+ @$(INSTALL_PROGRAM) -m 644 bacula-dir.service $(DESTDIR)/$(SYSTEMD_UNITDIR)
+ @$(INSTALL_PROGRAM) -m 644 bacula-sd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)
install-autostart-fd:
@if test x$(DESTDIR) = x -a -f $(SYSTEMD_UNITDIR)/bacula-fd.service; then \
devclean: clean
@rm -f Makefile bacula-*.spec bacula.*.spec bacula.spec
@rm -f bacula.conf bacula-sd.service bacula-fd.service bacula-dir.service
-
-# This file is part of package Bacula Director Daemon
+# Systemd Bacula Enterprise service file
+#
+# Copyright (C) Kern Sibbald 2011-2015
+# License: BSD 2-Clause
+#
+# /lib/systemd/system/bacula-dir.service
#
-# 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
+# Used to start/stop/reload the bacula director daemon service (bacula-dir)
+#
+# enable : systemctl enable bacula-dir
+# start : systemctl start bacula-dir
#
-# Bacula Director Daemon service
#
+
+# From http://www.freedesktop.org/software/systemd/man/systemd.unit.html
[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=
+Description=Bacula Enterprise Director Daemon service
+Requires=network.target
+After=network.target
+RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@ @piddir@
+# From http://www.freedesktop.org/software/systemd/man/systemd.service.html
[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 -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
+PIDFile=@piddir@/bacula-dir.@dir_port@.pid
+ExecReload=@sbindir@/bacula-dir -t -c @sysconfdir@/bacula-dir.conf
+ExecReload=/bin/kill -HUP $MAINPID
+StandardError=syslog
[Install]
WantedBy=multi-user.target
-# This file is part of package Bacula File Daemon
+# Systemd Bacula Enterprise service file
+#
+# Copyright (C) Kern Sibbald 2011-2015
+# License: BSD 2-Clause
+#
+# /lib/systemd/system/bacula-fd.service
#
-# 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
+# enable : systemctl enable bacula-fd
+# start : systemctl start bacula-fd
+#
#
+
+# from http://www.freedesktop.org/software/systemd/man/systemd.unit.html
[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=
+Description=Bacula Enterprise File Daemon service
+Requires=network.target
+After=network.target
+RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@ @piddir@
+# from http://www.freedesktop.org/software/systemd/man/systemd.service.html
[Service]
Type=forking
User=@fd_user@
Group=@fd_group@
-PIDFile=@piddir@/bacula-fd.@fd_port@.pid
-StandardOutput=syslog
ExecStart=@sbindir@/bacula-fd -c @sysconfdir@/bacula-fd.conf
+PIDFile=@piddir@/bacula-fd.@fd_port@.pid
+StandardError=syslog
[Install]
WantedBy=multi-user.target
-# This file is part of package Bacula Storage Daemon
+# Systemd Bacula Enterprise service file
+#
+# Copyright (C) Kern Sibbald 2011-2015
+# License: BSD 2-Clause
+#
+# /lib/systemd/system/bacula-sd.service
#
-# 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
+# enable : systemctl enable bacula-sd
+# start : systemctl start bacula-sd
#
-# Bacula Storage Daemon service
#
+
+# from http://www.freedesktop.org/software/systemd/man/systemd.unit.html
[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=
+Description=Bacula Enterprise Storage Daemon service
+Requires=network.target
+After=network.target
+RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@ @piddir@
+# from http://www.freedesktop.org/software/systemd/man/systemd.service.html
[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 -c @sysconfdir@/bacula-sd.conf
+PIDFile=@piddir@/bacula-sd.@sd_port@.pid
+StandardError=syslog
[Install]
WantedBy=multi-user.target
+#
+# Copyright (C) Kern Sibbald 2000-2015
+# License: BSD 2-Clause
#
# This file is used as the template to create the
# Makefile for the unknown specific installation.