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