aboutsummaryrefslogtreecommitdiffstats
path: root/config/freeradius2
diff options
context:
space:
mode:
Diffstat (limited to 'config/freeradius2')
-rw-r--r--config/freeradius2/freeradius.inc10
1 files changed, 9 insertions, 1 deletions
diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc
index 1aed5010..8472ea5e 100644
--- a/config/freeradius2/freeradius.inc
+++ b/config/freeradius2/freeradius.inc
@@ -76,7 +76,15 @@ if ($pfs_version == "2.2") {
}
function freeradius_deinstall_command() {
- exec("killall -9 radiusd");
+ $pidFile = "/var/run/radiusd.pid";
+ $i = 0;
+
+ while (isvalidpid($pidFile) && $i < 3) {
+ $sig = ($i == 2 ? SIGKILL : SIGTERM);
+ sigkillbypid($pidFile, $sig);
+ sleep(1);
+ $i++;
+ }
return;
}