⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rc.watchdog.redhat

📁 watchdog source watchdog source
💻 REDHAT
字号:
#!/bin/sh## chkconfig: - 20 80# description: A software watchdog### rc file author: Marc Merlin <marcsoft@merlins.org>#		  Henning P. Schmiedehausen <hps@tanstaafl.de>#	  Fix by: K. Yamato <kyamato@miraclelinux.com>#	    - Fix "${VERBOSE}="yes" line without no space characters.#	    - Default daemon status is set to off in all run levels.#          - The following settings are moved to /etc/sysconf/watchdog#             + choice of watchdog or wd_keepalive as a deamon#             + verbose option#             + modules loading and unloading commands### Note that even though chkconfig says that this should be run at runlevel 1,# RH by default won't do this, so the RPM applies an ugly patch to # /etc/rc.d/init.d/single so that if you go from RL 3 to RL 1, watchdog is# restarted anyway (if it's not, it can cause the kernel to reboot your machine# depending on whether your kernel was compiled with CONFIG_WATCHDOG_NOWAYOUT)## I have filed a bug with RH about this, and I hope they will change their# single script to allow for other scripts to be run in RL 1.# Source function library.. /etc/rc.d/init.d/functionsVERBOSE="no"WD_DAEMON=/usr/sbin/watchdogif [ -f /etc/sysconfig/watchdog ]; then    . /etc/sysconfig/watchdogfi[ -x ${WD_DAEMON} -a -e /etc/watchdog.conf ] || exit 0# See how we were called.case "$1" in  start)	echo -n "Starting watchdog daemon: "	# Load modules	if [ "x${START_MOD_CMD}" != "x" ]; then	  ${START_MOD_CMD}	fi	if [ "${VERBOSE}" = "yes" ]; then	    daemon ${WD_DAEMON} -v	else	    daemon ${WD_DAEMON}	fi	echo	touch /var/lock/subsys/watchdog	;;  stop)	echo -n "Stopping watchdog daemon: "	killproc ${WD_DAEMON}	# Unload modules	if [ "x${STOP_MOD_CMD}" != "x" ]; then	  ${STOP_MOD_CMD}	fi	rm -f /var/lock/subsys/watchdog	;;  status)	status ${WD_DAEMON}	;;  restart|reload)	/etc/rc.d/init.d/watchdog stop	/etc/rc.d/init.d/watchdog start	;;  *)	echo "Usage: watchdog {start|stop|status|restart|reload}"	exit 1	;;esacexit 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -