Analytic

Monday, August 18, 2008

Bacula automatic startup

Create a bacula file in /etc/init.d/ :

#!/bin/sh

case "$1" in
'start')
/etc/bacula/bacula start
;;
'stop')
/etc/bacula/bacula stop
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0

add these links as follows:

ln -s /etc/init.d/bacula /etc/rc2.d/S90bacula
ln -s /etc/init.d/bacula /etc/rc3.d/S90bacula
ln -s /etc/init.d/bacula /etc/rc4.d/S90bacula
ln -s /etc/init.d/bacula /etc/rc5.d/S90bacula
ln -s /etc/init.d/bacula /etc/rc0.d/K90bacula
ln -s /etc/init.d/bacula /etc/rc1.d/K90bacula
ln -s /etc/init.d/bacula /etc/rc6.d/K90bacula

or simply run:

update-rc.d bacula defaults 90

No comments: