mirror of
https://github.com/webmin/webmin.git
synced 2025-07-20 16:48:46 +00:00
Fix to call update boot script after adding boot #2133 [build]
This commit is contained in:
13
setup.pl
13
setup.pl
@ -765,15 +765,6 @@ else {
|
||||
chmod(0755, "$config_directory/reload");
|
||||
chmod(0755, "$config_directory/.pre-install");
|
||||
chmod(0755, "$config_directory/.post-install");
|
||||
|
||||
# Fix existing systemd webmin.service file to update start and stop commands
|
||||
chdir("$wadir/init");
|
||||
system("$perl "."e_path("$wadir/init/updateboot.pl")." $bootscript");
|
||||
}
|
||||
else {
|
||||
# Try to install init script to init.d
|
||||
chdir("$wadir/init");
|
||||
system("$perl "."e_path("$wadir/init/updateboot.pl")." $bootscript");
|
||||
}
|
||||
}
|
||||
print ".. done\n";
|
||||
@ -837,6 +828,7 @@ if ($theme && -d "$wadir/$theme") {
|
||||
# Set the product field in the global config
|
||||
$gconfig{'product'} ||= "webmin";
|
||||
|
||||
# Add boot script if needed
|
||||
if ($makeboot) {
|
||||
print "Configuring Webmin to start at boot time ..\n";
|
||||
chdir("$wadir/init");
|
||||
@ -845,6 +837,9 @@ if ($makeboot) {
|
||||
print "\n";
|
||||
}
|
||||
|
||||
# Update boot script if needed
|
||||
chdir("$wadir/init");
|
||||
system("$perl "."e_path("$wadir/init/updateboot.pl")." $bootscript");
|
||||
|
||||
# If password delays are not specifically disabled, enable them
|
||||
if (!defined($miniserv{'passdelay'}) && $os_type ne 'windows') {
|
||||
|
7
setup.sh
7
setup.sh
@ -791,9 +791,6 @@ if [ -x "$systemctlcmd" ]; then
|
||||
chmod 755 $config_dir/stop $config_dir/start $config_dir/restart $config_dir/restart-by-force-kill $config_dir/reload $config_dir/.pre-install $config_dir/.post-install
|
||||
fi
|
||||
|
||||
# Fix existing systemd webmin.service file to update start and stop commands
|
||||
(cd "$wadir/init" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/init/updateboot.pl" "$bootscript")
|
||||
|
||||
if [ "$upgrading" = 1 -a "$inetd" != "1" -a "$nostop" = "" ]; then
|
||||
# Stop old version, with updated stop script
|
||||
$config_dir/.pre-install >/dev/null 2>&1
|
||||
@ -898,6 +895,7 @@ if [ "$?" != "0" ]; then
|
||||
echo product=webmin >> $config_dir/config
|
||||
fi
|
||||
|
||||
# Add boot script if needed
|
||||
if [ "$makeboot" = "1" ]; then
|
||||
echo "Configuring Webmin to start at boot time .."
|
||||
(cd "$wadir/init" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/init/atboot.pl" $bootscript)
|
||||
@ -905,6 +903,9 @@ if [ "$makeboot" = "1" ]; then
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Update boot script if needed
|
||||
(cd "$wadir/init" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/init/updateboot.pl" "$bootscript")
|
||||
|
||||
# If password delays are not specifically disabled, enable them
|
||||
grep passdelay= $config_dir/miniserv.conf >/dev/null
|
||||
if [ "$?" != "0" ]; then
|
||||
|
Reference in New Issue
Block a user