diff options
author | nagyrobi <robreg@zsurob.hu> | 2013-09-19 15:43:21 +0200 |
---|---|---|
committer | nagyrobi <robreg@zsurob.hu> | 2013-09-19 15:43:21 +0200 |
commit | 699e4eead99eeb72d66737408010d4266b8cd83f (patch) | |
tree | 5615ca37896ba21bd08d9db263f9a6943aca9dfc /config/asterisk/asterisk.inc | |
parent | 0724ed0f0781e859f22b13884f2aa7d522f5254d (diff) | |
download | pfsense-packages-699e4eead99eeb72d66737408010d4266b8cd83f.tar.gz pfsense-packages-699e4eead99eeb72d66737408010d4266b8cd83f.tar.bz2 pfsense-packages-699e4eead99eeb72d66737408010d4266b8cd83f.zip |
Update asterisk.inc
for NanoBSD compatibility, move the /etc/asterisk configuration directory to /conf, and symlink it back. /conf/asterisk is also required by asterisk_edit_file.php.
Diffstat (limited to 'config/asterisk/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();
|