3 # description: The rebootmgr service is monitoring all virtual servers \
4 # and restart them as need. Virtual servers are using \
5 # the /sbin/vreboot command to talk with the reboot manager
6 # processname: rebootmgr
7 # config: /etc/vservers
9 : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
10 test -e "$UTIL_VSERVER_VARS" || {
11 echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
14 . "$UTIL_VSERVER_VARS"
16 PIDFILE=/var/run/rebootmgr.pid
17 # See how we were called.
20 echo "Starting the reboot manager"
25 test -f "$serv" || continue
27 serv=`basename $serv .conf`
28 if [ -d $__DEFAULT_VSERVERDIR/$serv ] ; then
29 VSERVERS="$VSERVERS $serv"
32 $_REBOOTMGR --pidfile $PIDFILE $VSERVERS &
33 touch /var/lock/subsys/rebootmgr
36 echo "Stopping the reboot manager"
38 rm -f /var/lock/subsys/rebootmgr
49 if [ -f $PIDFILE ] ; then
50 if kill -0 `cat $PIDFILE`
52 echo rebootmgr is running
54 echo rebootmgr is NOT running
59 echo "Usage: rebootmgr {start|stop|restart|reload|status}"