Rev 4 | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/bin/sh# chkconfig: 235 99 10# description: web-based administration interface for Unix systems#### BEGIN INIT INFO# Provides: webmin# Required-Start: $local_fs $network $syslog# Required-Stop: $local_fs $network# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: web-based administration interface for Unix systems# Description: Webmin is a web-based interface for system administration# for Unix. Using Webmin you can configure DNS, Samba, NFS,# local/remote filesystems and more using your web browser.### END INIT INFOPATH=/sbin:/usr/sbin:/bin:/usr/binDESC="web-based administration interface for Unix systems"NAME=WebminPIDFILE=/var/webmin/miniserv.pidSCRIPTNAME=/etc/init.d/$NAMESTART=/etc/webmin/startSTOP=/etc/webmin/stopRELOAD=/etc/webmin/reloadLOCKFILE=/var/lock/subsys/webminCONFFILE=/etc/webmin/miniserv.confcase "$1" instart)$START >/dev/null 2>&1 </dev/nullRETVAL=$?if [ "$RETVAL" = "0" ]; thentouch $LOCKFILE >/dev/null 2>&1fi;;stop)$STOPRETVAL=$?if [ "$RETVAL" = "0" ]; thenrm -f $LOCKFILEfipidfile=`grep "^pidfile=" $CONFFILE | sed -e 's/pidfile=//g'`if [ "$pidfile" = "" ]; thenpidfile=$PIDFILEfirm -f $pidfile;;status)pidfile=`grep "^pidfile=" $CONFFILE | sed -e 's/pidfile=//g'`if [ "$pidfile" = "" ]; thenpidfile=$PIDFILEfiif [ -s $pidfile ]; thenpid=`cat $pidfile`kill -0 $pid >/dev/null 2>&1if [ "$?" = "0" ]; thenecho "$NAME (pid $pid) is running"RETVAL=0elseecho "$NAME is stopped"RETVAL=1fielseecho "$NAME is stopped"RETVAL=1fi;;restart)$STOP ; $STARTRETVAL=$?;;reload|force-reload)$RELOADRETVAL=$?;;*)echo "Usage: $0 {start|stop|restart|reload|force-reload|status}" >&2RETVAL=1;;esacexit $RETVAL