diff options
author | Renato Botelho <garga@pfSense.org> | 2013-09-21 11:00:20 -0700 |
---|---|---|
committer | Renato Botelho <garga@pfSense.org> | 2013-09-21 11:00:20 -0700 |
commit | 36614bfb623b95bd9596fc07fe7c1f1fcba53ad0 (patch) | |
tree | be6fb904de009a424e8802dc0088ba9f30f5b193 /config | |
parent | 0ecef974e8def9988a2be695e7bad2575e25792f (diff) | |
parent | 74ccdc659710148e22285ee4fdd28adbb6e2ac77 (diff) | |
download | pfsense-packages-36614bfb623b95bd9596fc07fe7c1f1fcba53ad0.tar.gz pfsense-packages-36614bfb623b95bd9596fc07fe7c1f1fcba53ad0.tar.bz2 pfsense-packages-36614bfb623b95bd9596fc07fe7c1f1fcba53ad0.zip |
Merge pull request #503 from nagyrobi/patch-13
Update asterisk.inc
Diffstat (limited to 'config')
-rw-r--r-- | config/asterisk/asterisk.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/config/asterisk/asterisk.inc b/config/asterisk/asterisk.inc index d3a1cf67..d766c77a 100644 --- a/config/asterisk/asterisk.inc +++ b/config/asterisk/asterisk.inc @@ -62,12 +62,14 @@ function sync_package_asterisk() { system("mv -f /usr/pbi/asterisk-amd64/etc/asterisk/ /conf/asterisk/ && ln -s /conf/asterisk /usr/pbi/asterisk-amd64/etc/asterisk");
}
if (file_exists("/conf/asterisk/")) {
- //this should occur on all systems v2.0 and up
if (file_exists("/usr/local/etc/asterisk/")) {
system("mv -f /usr/local/etc/asterisk /usr/local/etc/asterisk.bak");
}
system("ln -s /conf/asterisk /usr/local/etc/asterisk");
system("cd /conf/asterisk && mkdir dist && mv *-dist dist");
+ } else {
+ //should reach here only on non-pbi installs (2.0.x)
+ system("mv -f /usr/local/etc/asterisk/ /conf/asterisk/ && ln -s /conf/asterisk /usr/local/etc/asterisk");
}
//fix asterisk options for nanobsd: logging, db and calls log in /tmp
@@ -366,7 +368,10 @@ function sync_package_asterisk() { mwexec_bg("$script start");
}
- #mount filesystem readonly
+ //prepare backup for factory defaults
+ system("cd /conf/asterisk/ && tar czf /conf.default/asterisk_factory_defaults_config.tgz *");
+
+ //mount filesystem readonly
conf_mount_ro();
}
|