Fix to call update boot script after adding boot #2133 [build]

This commit is contained in:
Ilia Ross
2024-04-21 17:45:10 +03:00
parent f1804201e6
commit 985129bb70
2 changed files with 8 additions and 12 deletions

View File

@@ -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