From 517c43c39bb9333293ace012eb06f41960adb32c Mon Sep 17 00:00:00 2001 From: Ilia Date: Fri, 3 Jun 2022 14:09:34 +0300 Subject: [PATCH] Lower reload time but make sure it's not auto-restarted on force reload --- setup.pl | 2 +- setup.sh | 2 +- webmin-systemd | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.pl b/setup.pl index 4f013cbc8..7beb774da 100755 --- a/setup.pl +++ b/setup.pl @@ -642,8 +642,8 @@ else { # Force reload systemd open(FRELOADD, ">$config_directory/restart-by-force-kill"); - print FRELOADD "$config_directory/.stop-init --kill >/dev/null 2>&1\n"; print FRELOADD "$systemctlcmd stop webmin\n"; + print FRELOADD "$config_directory/.stop-init --kill >/dev/null 2>&1\n"; print FRELOADD "$systemctlcmd start webmin\n"; close(FRELOADD); diff --git a/setup.sh b/setup.sh index db7387ebb..ae6028729 100755 --- a/setup.sh +++ b/setup.sh @@ -694,8 +694,8 @@ if [ -x "$systemctlcmd" ]; then echo "$systemctlcmd restart webmin" >>$config_dir/restart # Force reload systemd echo "#!/bin/sh" >>$config_dir/restart-by-force-kill - echo "$config_dir/.stop-init --kill >/dev/null 2>&1" >>$config_dir/restart-by-force-kill echo "$systemctlcmd stop webmin" >>$config_dir/restart-by-force-kill + echo "$config_dir/.stop-init --kill >/dev/null 2>&1" >>$config_dir/restart-by-force-kill echo "$systemctlcmd start webmin" >>$config_dir/restart-by-force-kill # Reload systemd echo "#!/bin/sh" >>$config_dir/reload diff --git a/webmin-systemd b/webmin-systemd index cacd9ee07..5cbd00af0 100644 --- a/webmin-systemd +++ b/webmin-systemd @@ -8,7 +8,7 @@ ExecStop=/etc/webmin/.stop-init PIDFile=/var/webmin/miniserv.pid Type=forking Restart=on-failure -RestartSec=3s +RestartSec=1s StartLimitBurst=3 StartLimitIntervalSec=3 OOMPolicy=continue