| Server IP : 172.67.134.114 / Your IP : 104.23.197.122 Web Server : Apache/2.4.37 System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64 User : ricodeal ( 1046) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/libexec/webmin/usermin/ |
Upload File : |
#!/usr/bin/perl
# bootup.cgi
# Create, enable or disable usermin startup at boot time
require './usermin-lib.pl';
$access{'bootup'} || &error($text{'bootup_ecannot'});
&foreign_require("init");
&ReadParse();
my %miniserv;
&get_usermin_miniserv_config(\%miniserv);
if ($in{'boot'}) {
# Enable starting at boot
$start = "$config{'usermin_dir'}/start";
if ($init::init_mode eq "launchd") {
# Launchd forks automatically
$start .= " --nofork";
$fork = 0;
}
else {
$fork = 1;
}
$stop = "$config{'usermin_dir'}/stop";
$status = <<EOF;
pidfile=`grep "^pidfile=" $config{'usermin_dir'}/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 "usermin (pid \$pid) is running"
RETVAL=0
else
echo "usermin is stopped"
RETVAL=1
fi
else
echo "usermin is stopped"
RETVAL=1
fi
EOF
&init::enable_at_boot("usermin", "Start or stop Usermin",
$start, $stop, $status,
{ 'fork' => $fork,
'pidfile' => $miniserv{'pidfile'} });
}
else {
# Disable starting at boot
&init::disable_at_boot("usermin");
}
&redirect("");