head	1.5;
access;
symbols
	RELEASE-1_4:1.3.0.2;
locks; strict;
comment	@# @;


1.5
date	2005.07.04.01.53.06;	author robbat2;	state dead;
branches;
next	1.4;

1.4
date	2004.07.14.21.08.44;	author agriffis;	state Exp;
branches;
next	1.3;

1.3
date	2003.06.12.03.54.00;	author woodchip;	state Exp;
branches;
next	1.2;

1.2
date	2003.02.14.22.01.00;	author vapier;	state Exp;
branches;
next	1.1;

1.1
date	2003.01.30.00.19.10;	author woodchip;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Moved to app-backup/bacula.
@
text
@#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/bacula/files/bacula-init,v 1.4 2004/07/14 21:08:44 agriffis Exp $

depend() {
	need net
	use mysql
}

opts="test"

# A client would only need to run the file daemon, so if thats the
# case for this machine just comment the other two out below here...
start() {
	ebegin "Starting bacula storage daemon"
	start-stop-daemon --start --quiet --exec /usr/sbin/bacula-sd \
		-- -c /etc/bacula/bacula-sd.conf
	result=$?

	ebegin "Starting bacula file daemon"
	start-stop-daemon --start --quiet --exec /usr/sbin/bacula-fd \
		-- -c /etc/bacula/bacula-fd.conf
	result=$(( $result + $? ))
	sleep 2

	ebegin "Starting bacula director"
	start-stop-daemon --start --quiet --exec /usr/sbin/bacula-dir \
		-- -c /etc/bacula/bacula-dir.conf
	result=$(( $result + $? ))

	eend $result
}

# The default port numbers appear in the pidfile paths below.
# Might wanna programmatically grab them from the config files
# or something...
stop() {
	ebegin "Stopping bacula file daemon"
	start-stop-daemon --stop --quiet --pidfile /var/run/bacula-fd.9102.pid
	result=$?
	ebegin "Stopping bacula storage daemon"
	start-stop-daemon --stop --quiet --pidfile /var/run/bacula-sd.9103.pid
	result=$(( $result + $? ))
	ebegin "Stopping bacula director"
	start-stop-daemon --stop --quiet --pidfile /var/run/bacula-dir.9101.pid
	result=$(( $result + $? ))
	eend $result
}

test() {
	ebegin "Testing bacula storage daemon configuration"
	/usr/sbin/bacula-sd -t -c /etc/bacula/bacula-sd.conf
	result=$?
	ebegin "Testing bacula file daemon configuration"
	/usr/sbin/bacula-fd -t -c /etc/bacula/bacula-fd.conf
	result=$(( $result + $? ))
	ebegin "Testing bacula director configuration"
	/usr/sbin/bacula-dir -t -c /etc/bacula/bacula-dir.conf
	result=$(( $result + $? ))
	eend $result
}
@


1.4
log
@Gentoo Technologies -> Gentoo Foundation
@
text
@d4 1
a4 1
# $Header: /var/cvsroot/gentoo-x86/app-admin/bacula/files/bacula-init,v 1.3 2003/06/12 03:54:00 woodchip Exp $
@


1.3
log
@bump.
@
text
@d2 1
a2 1
# Copyright 1999-2003 Gentoo Technologies, Inc.
d4 1
a4 1
# $Header: $
@


1.2
log
@update copyright info
@
text
@d17 2
a18 1
	start-stop-daemon --start --quiet --exec /usr/sbin/bacula-sd
d20 1
d22 2
a23 1
	start-stop-daemon --start --quiet --exec /usr/sbin/bacula-fd
d26 1
d28 2
a29 1
	start-stop-daemon --start --quiet --exec /usr/sbin/bacula-dir
d31 1
d53 1
a53 1
	/usr/sbin/bacula-sd -t
d56 1
a56 1
	/usr/sbin/bacula-fd -t
d59 1
a59 1
	/usr/sbin/bacula-dir -t
@


1.1
log
@new package; created my me
@
text
@@

