aboutsummaryrefslogtreecommitdiffstats
path: root/config/asterisk
diff options
context:
space:
mode:
authornagyrobi <robreg@zsurob.hu>2013-09-19 15:43:21 +0200
committernagyrobi <robreg@zsurob.hu>2013-09-19 15:43:21 +0200
commit699e4eead99eeb72d66737408010d4266b8cd83f (patch)
tree5615ca37896ba21bd08d9db263f9a6943aca9dfc /config/asterisk
parent0724ed0f0781e859f22b13884f2aa7d522f5254d (diff)
downloadpfsense-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')
-rw-r--r--config/asterisk/asterisk.inc20
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();