MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /etc/rc6.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //etc/rc6.d/K10webmin
#!/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

Anon7 - 2021