From 1dec547bf945338e7ee9ffadd9f864ce5cc3a978 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 30 Sep 2006 01:41:48 +0000 Subject: [PATCH] Wait 5 seconds after stopping or starting a service to give the kill or starting process enough time to do its magic instead of marking the service as up when it really is not. --- usr/local/www/status_services.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/usr/local/www/status_services.php b/usr/local/www/status_services.php index bc2d9f8ae4..a91680728a 100755 --- a/usr/local/www/status_services.php +++ b/usr/local/www/status_services.php @@ -46,15 +46,19 @@ if($_GET['mode'] == "restartservice" and $_GET['service']) { switch($_GET['service']) { case 'bsnmpd': services_snmpd_configure(); + sleep(5); break; case 'dnsmasq': services_dnsmasq_configure(); + sleep(5); break; case 'dhcpd': services_dhcpd_configure(); + sleep(5); break; default: restart_service($_GET['service']); + sleep(5); break; } $savemsg = "{$_GET['service']} has been restarted."; @@ -64,15 +68,19 @@ if($_GET['mode'] == "startservice" and $_GET['service']) { switch($_GET['service']) { case 'bsnmpd': services_snmpd_configure(); + sleep(5); break; case 'dnsmasq': services_dnsmasq_configure(); + sleep(5); break; case 'dhcpd': services_dhcpd_configure(); + sleep(5); break; default: start_service($_GET['service']); + sleep(5); break; } $savemsg = "{$_GET['service']} has been started.";