Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
backup
>
bacula
> bacula-dir.init
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File bacula-dir.init of Package bacula
#! /bin/sh # Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany. # All rights reserved. ### BEGIN INIT INFO # Provides: bacula-dir # Required-Start: $local_fs $network mysql $remote_fs # Required-Stop: $local_fs $network mysql $remote_fs # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: bacula director # Description: Bacula network backup system director daemon ### END INIT INFO # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v ditto but be verbose in local rc status # rc_status -v -r ditto and clear the local rc status # rc_failed set local and overall rc status to failed # rc_failed <num> set local and overall rc status to <num><num> # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status . /etc/rc.status BACULA_FD_BIN=/usr/sbin/bacula-dir test -x $BACULA_FD_BIN || { echo "$BACULA_FD_BIN not installed"; if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } case "$1" in start) echo -n "Starting the Bacula Director daemon" startproc -q $BACULA_FD_BIN -c /etc/bacula/bacula-dir.conf rc_status -v ;; stop) echo -n "Shutting down the Bacula Director daemon" killproc -TERM $BACULA_FD_BIN rc_status -v ;; try-restart|condrestart) if test "$1" = "condrestart"; then echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" fi $0 status if test $? = 0; then $0 restart else rc_reset fi rc_status ;; restart) $0 stop $0 start rc_status ;; force-reload) $0 try-restart rc_status ;; reload) rc_failed 3 rc_status -v ;; status) echo -n "Checking for service the Bacula Director daemon" checkproc $BACULA_FD_BIN rc_status -v ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" exit 1 ;; esac rc_exit