If webmin is not starting by default on your computer you need to create a script in your /etc/init.d with this content, call the script webmin.
#!/bin/sh# chkconfig: 235 99 10# description: Start or stop the Webmin server#### BEGIN INIT INFO# Provides: webmin# Required-Start: $network $syslog# Required-Stop: $network# Default-Start: 2 3 5# Default-Stop: 0 1 6# Description: Start or stop the Webmin server### END INIT INFOstart=/etc/webmin/startstop=/etc/webmin/stoplockfile=/var/lock/subsys/webminconfFile=/etc/webmin/miniserv.confpidFile=/var/webmin/miniserv.pidname='Webmin'case "$1" in'start')$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=$?;;*)echo "Usage: $0 { start | stop | restart }"RETVAL=1;;esacexit $RETVAL
Make this executable with:
sudo chmod 755 /etc/init.d/webminAdd it to the startup procedure with:
update-rc.d webmin defaultsAfter this webmin will start with your computer.
To avoid all these small things you can also download webmin as a debian package that you can install in your system.
TiếnPT R0039
0 nhận xét:
Post a Comment