3 # Create, enable or disable usermin startup at boot time
5 require './usermin-lib.pl';
6 $access{'bootup'} || &error($text{'bootup_ecannot'});
7 &foreign_require("init", "init-lib.pl");
11 # Enable starting at boot
12 $start = "$config{'usermin_dir'}/start";
13 $stop = "$config{'usermin_dir'}/stop";
15 pidfile=`grep "^pidfile=" $config{'usermin_dir'}/miniserv.conf | sed -e 's/pidfile=//g'`
16 if [ -s \$pidfile ]; then
18 kill -0 \$pid >/dev/null 2>&1
19 if [ "\$?" = "0" ]; then
20 echo "usermin (pid \$pid) is running"
23 echo "usermin is stopped"
27 echo "usermin is stopped"
31 &init::enable_at_boot("usermin", "Start or stop Usermin",
32 $start, $stop, $status);
35 # Disable starting at boot
36 &init::disable_at_boot("usermin");