mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
71 lines
1.1 KiB
Bash
71 lines
1.1 KiB
Bash
#! /bin/bash
|
|
#
|
|
# xen-watchdog
|
|
#
|
|
# chkconfig: 2345 21 79
|
|
# description: Run domain watchdog daemon
|
|
### BEGIN INIT INFO
|
|
# Provides: xen-watchdog
|
|
# Required-Start: xend
|
|
# Should-Start: $syslog $remote_fs
|
|
# Required-Stop: xend
|
|
# Should-Stop: $syslog $remote_fs
|
|
# Default-Start: 3 4 5
|
|
# Default-Stop: 0 1 2 6
|
|
# Short-Description: Start/stop xen-watchdog
|
|
# Description: Run domain watchdog daemon.
|
|
### END INIT INFO
|
|
#
|
|
|
|
# Source function library.
|
|
. /etc/init.d/functions
|
|
|
|
start() {
|
|
local r
|
|
base="watchdogd"
|
|
echo -n $"Starting domain watchdog daemon: "
|
|
|
|
/usr/sbin/xenwatchdogd 30 15
|
|
r=$?
|
|
[ "$r" -eq 0 ] && success $"$base startup" || failure $"$base startup"
|
|
echo
|
|
|
|
return $r
|
|
}
|
|
|
|
stop() {
|
|
local r
|
|
base="watchdogd"
|
|
echo -n $"Stopping domain watchdog daemon: "
|
|
|
|
killall -USR1 watchdogd 2>/dev/null
|
|
r=$?
|
|
[ "$r" -eq 0 ] && success $"$base stop" || failure $"$base stop"
|
|
echo
|
|
|
|
return $r
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart)
|
|
stop
|
|
start
|
|
;;
|
|
status)
|
|
;;
|
|
condrestart)
|
|
stop
|
|
start
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
|
|
exit 1
|
|
esac
|
|
|