diff options
author | Marcello Coutinho <marcellocoutinho@gmail.com> | 2013-09-19 06:46:12 -0700 |
---|---|---|
committer | Marcello Coutinho <marcellocoutinho@gmail.com> | 2013-09-19 06:46:12 -0700 |
commit | 145c6665c5d1864ac4f4f2c3f3171d47c8bdd982 (patch) | |
tree | 5615ca37896ba21bd08d9db263f9a6943aca9dfc | |
parent | 0724ed0f0781e859f22b13884f2aa7d522f5254d (diff) | |
parent | 699e4eead99eeb72d66737408010d4266b8cd83f (diff) | |
download | pfsense-packages-145c6665c5d1864ac4f4f2c3f3171d47c8bdd982.tar.gz pfsense-packages-145c6665c5d1864ac4f4f2c3f3171d47c8bdd982.tar.bz2 pfsense-packages-145c6665c5d1864ac4f4f2c3f3171d47c8bdd982.zip |
Merge pull request #499 from nagyrobi/patch-9
Update asterisk.inc
-rw-r--r-- | config/asterisk/asterisk.inc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/config/asterisk/asterisk.inc b/config/asterisk/asterisk.inc index 37189220..071e796f 100644 --- a/config/asterisk/asterisk.inc +++ b/config/asterisk/asterisk.inc @@ -319,7 +319,6 @@ function sync_package_asterisk() { file_put_contents($script, $add_sip_general_settings, LOCK_EX);
}
-
$script='/usr/local/etc/rc.d/asterisk';
if (file_exists($script)){
$script_file=file_get_contents($script);
@@ -343,6 +342,25 @@ function sync_package_asterisk() { mwexec("$script stop");
mwexec_bg("$script start");
}
+
+ //for NanoBSD compatibility, move the /etc/asterisk configuration directory to /conf, and symlink it back
+
+ if (file_exists("/usr/pbi/asterisk-i386/etc/asterisk/")) {
+ //this should occur only on i386 systems v2.1 and up
+ rename("/usr/pbi/asterisk-i386/etc/asterisk", "/conf/asterisk");
+ symlink("/conf/asterisk", "/usr/pbi/asterisk-i386/etc/asterisk");
+ }
+ if (file_exists("/usr/pbi/asterisk-amd64/etc/asterisk/")) {
+ //this should occur only on amd64 systems v2.1 and up
+ rename("/usr/pbi/asterisk-amd64/etc/asterisk", "/conf/asterisk");
+ symlink("/conf/asterisk", "/usr/pbi/asterisk-amd64/etc/asterisk");
+ }
+ if (file_exists("/usr/local/etc/asterisk/")) {
+ //this should occur on all systems v2.0
+ rename("/usr/local/etc/asterisk", "/usr/local/etc/asterisk.orig");
+ }
+ symlink("/conf/asterisk", "/usr/local/etc/asterisk");
+
#mount filesystem readonly
conf_mount_ro();
|