pkgsrc/sysutils/bacula/files/bacula.sh
mjl 4c69321a7d Initial import of bacula 1.36.0, based on the older version in
pkgsrc-wip.

Bacula is a set of computer programs that permit you (or the system
administrator) to manage backup, recovery, and verification of computer data
across a network of computers of different kinds. In technical terms, it is
a network client/server based backup program. Bacula is relatively easy to
use and efficient, while offering many advanced storage management features
that make it easy to find and recover lost or damaged files. Bacula source
code has been released under the GPL version 2 license.

To Do: Split client/server package, add a frontend (gnome) package.
2004-11-06 16:17:38 +00:00

52 lines
880 B
Bash

#!/bin/sh
#
# KEYWORD: nostart
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
rcd_dir=`/usr/bin/dirname $0`
# NOTE: run_rc_command sets $rc_arg
#
forward_commands()
{
# Backward compat with NetBSD <1.6:
[ -z "$rc_arg" ] && rc_arg=$_arg
for file in $COMMAND_LIST; do
$rcd_dir/$file $rc_arg
done
}
reverse_commands()
{
# Backward compat with NetBSD <1.6:
[ -z "$rc_arg" ] && rc_arg=$_arg
REVCOMMAND_LIST=
for file in $COMMAND_LIST; do
REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
done
for file in $REVCOMMAND_LIST; do
$rcd_dir/$file $rc_arg
done
}
COMMAND_LIST="bacula-dir bacula-sd bacula-fd"
name="bacula"
start_cmd="forward_commands"
stop_cmd="reverse_commands"
reload_cmd="forward_commands"
status_cmd="forward_commands"
extra_commands="reload status"
if [ -f /etc/rc.subr ]; then
run_rc_command "$1"
else
echo -n " ${name}"
_arg="$1"
${start_cmd}
fi