summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-09-09 17:31:16 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-09-09 17:31:16 +0000
commitec11a1adce38722253bd1e0487a246d6760d1117 (patch)
tree65f9601c3685148c2c22f69b995744ab4361bb17 /etc
parent5c5ffbca6acf715f4920926ef917b67b8594c6a9 (diff)
downloadpfsense-ec11a1adce38722253bd1e0487a246d6760d1117.zip
pfsense-ec11a1adce38722253bd1e0487a246d6760d1117.tar.gz
Kill mpd and restart on wan changes if mpd is running.
Ticket #477
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index b0540fb..aafc542 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -929,6 +929,12 @@ EOD;
fwrite($fd, $mpdconf);
fclose($fd);
+ /* if mpd is active, lets take it down */
+ if(file_exists("{$g['varrun_path']}/mpd.pid")) {
+ killbypid(file_get_contents("{$g['varrun_path']}/mpd.pid"));
+ sleep(3);
+ }
+
/* fire up mpd */
mwexec("/usr/local/sbin/mpd -b -d {$g['varetc_path']} -p {$g['varrun_path']}/mpd.pid pppoe");
OpenPOWER on IntegriCloud