3 # Create, enable or disable webmin startup at boot time
5 require './webmin-lib.pl';
6 &foreign_require("init", "init-lib.pl");
10 # Enable starting at boot
11 $start = "$config_directory/start";
12 $stop = "$config_directory/stop";
14 pidfile=`grep "^pidfile=" $config_directory/miniserv.conf | sed -e 's/pidfile=//g'`
15 if [ -s \$pidfile ]; then
17 kill -0 \$pid >/dev/null 2>&1
18 if [ "\$?" = "0" ]; then
19 echo "webmin (pid \$pid) is running"
22 echo "webmin is stopped"
26 echo "webmin is stopped"
30 &init::enable_at_boot("webmin", "Start or stop Webmin",
31 $start, $stop, $status);
34 # Disable starting at boot
35 &init::disable_at_boot("webmin");