diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-09-08 21:41:35 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-09-08 21:41:35 +0000 |
commit | f9a5831e6782c0c5dfeed339325689e660f52871 (patch) | |
tree | 0b570e7ce0bcc8d471492787dc92a04e83e6790a /etc | |
parent | dd462f3ead418f6733c32ba0b709caea2d7e7f7b (diff) | |
download | pfsense-f9a5831e6782c0c5dfeed339325689e660f52871.zip pfsense-f9a5831e6782c0c5dfeed339325689e660f52871.tar.gz |
If hostapd is already running, -HUP it
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index e0c7f47..b0540fb 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -480,7 +480,11 @@ EOD; $fd = fopen("{$g['etc_path']}/hostapd_{$if}.conf", "w"); fwrite($fd, "{$wpa}"); fclose($fd); - mwexec("/usr/sbin/hostapd -B {$g['etc_path']}/hostapd_{$if}.conf"); + if(is_process_running("hostapd")) { + mwexec("/usr/bin/killall -HUP hostapd"); + } else { + mwexec("/usr/sbin/hostapd -B {$g['etc_path']}/hostapd_{$if}.conf"); + } } break; |