]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/openbsd/bacula-dir.in
de399d04563cfa4676b93ea2a77381ebe56d78bf
[bacula/bacula] / bacula / platforms / openbsd / bacula-dir.in
1 #! /bin/sh
2 #
3 # Copyright (C) 2000-2015 by Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6 # bacula       This shell script takes care of starting and stopping
7 #              the bacula Director daemon
8 #
9 # chkconfig: 2345 90 9
10 # description: The Leading Open Source Backup Solution.
11 #
12 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
13 #
14
15 RETVAL=0
16 case "$1" in
17     start)
18        echo "Starting the Bacula Director: "
19        @sbindir@/bacula-dir $2 -c @sysconfdir@/bacula-dir.conf
20        RETVAL=$?
21        echo
22        [ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-dir
23        ;;
24     stop)
25        echo "Stopping the Director daemon: "
26 #      killproc @sbindir@/bacula-dir
27        RETVAL=$?
28        echo
29        [ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-dir
30        ;;
31     restart)
32        $0 stop
33        sleep 5
34        $0 start
35        RETVAL=$?
36        ;;
37     *)
38        echo "Usage: $0 {start|stop|restart}"
39        exit 1
40        ;;
41 esac
42 exit $RETVAL