MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //etc/rc.d/rc6.d/K99webmin
#!/bin/sh
# description: Start/stop Webmin
# chkconfig: 2345 99 99

case "$1" in
'start')
	/etc/webmin/start >/dev/null 2>&1 </dev/null
	RETVAL=$?
	if [ "$RETVAL" = "0" ]; then
		touch /var/lock/subsys/webmin
	fi
	;;
'stop')
	/etc/webmin/stop
	RETVAL=$?
	if [ "$RETVAL" = "0" ]; then
		rm -f /var/lock/subsys/webmin
	fi
	;;
'status')
	pidfile=`grep "^pidfile=" /etc/webmin/miniserv.conf | sed -e 's/pidfile=//g'`
	if [ -s $pidfile ]; then
		pid=`cat $pidfile`
		kill -0 $pid >/dev/null 2>&1
		if [ "$?" = "0" ]; then
			echo "webmin (pid $pid) is running"
			RETVAL=0
		else
			echo "webmin is stopped"
			RETVAL=1
		fi
	else
		echo "webmin is stopped"
		RETVAL=1
	fi
	;;
'restart')
	/etc/webmin/stop ; /etc/webmin/start
	RETVAL=$?
	;;
*)
	echo "Usage: $0 { start | stop }"
	RETVAL=1
	;;
esac
exit $RETVAL