diff options
author | Renato Botelho <renato@netgate.com> | 2015-11-23 08:41:00 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-11-23 08:41:00 -0200 |
commit | 11ff96371de9923bce3ebbca594831cf8f2452f7 (patch) | |
tree | eb9ed2effa56fc7a3cca829550fe0581692276c2 | |
parent | 942d92c0b2cfd5ed0a54fa35f5a6006155aa4304 (diff) | |
parent | 86060cc98bfc6c65bb6181ac011cc5a928978fff (diff) | |
download | pfsense-packages-11ff96371de9923bce3ebbca594831cf8f2452f7.tar.gz pfsense-packages-11ff96371de9923bce3ebbca594831cf8f2452f7.tar.bz2 pfsense-packages-11ff96371de9923bce3ebbca594831cf8f2452f7.zip |
Merge pull request #1191 from doktornotor/patch-2
-rw-r--r-- | config/asterisk/asterisk.inc | 22 | ||||
-rw-r--r-- | pkg_config.10.xml | 2 | ||||
-rw-r--r-- | pkg_config.8.xml | 2 | ||||
-rw-r--r-- | pkg_config.8.xml.amd64 | 2 |
4 files changed, 23 insertions, 5 deletions
diff --git a/config/asterisk/asterisk.inc b/config/asterisk/asterisk.inc index ed835b25..899fc370 100644 --- a/config/asterisk/asterisk.inc +++ b/config/asterisk/asterisk.inc @@ -28,6 +28,10 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +require_once("config.inc"); +require_once("service-utils.inc"); +require_once("util.inc"); + define('ASTERISK_CONF_DIR', '/conf/asterisk'); $pf_version=substr(trim(file_get_contents("/etc/version")), 0, 3); if ($pf_version == "2.1" || $pf_version == "2.2") { @@ -43,6 +47,7 @@ function asterisk_install() { } function sync_package_asterisk() { + global $g; conf_mount_rw(); // For NanoBSD compatibility, move the /etc/asterisk configuration directory to /conf, and symlink it back @@ -401,13 +406,26 @@ EOF; 'start' => $start, 'stop' => $stop )); - restart_service("asterisk"); - // Prepare backup for factory defaults restoring feature if (!file_exists("/conf.default/asterisk_factory_defaults_config.tgz")) { system("cd /conf/asterisk/ && /usr/bin/tar czf /conf.default/asterisk_factory_defaults_config.tgz *"); } + /* Do not (re)start the service on boot */ + if (function_exists("platform_booting")) { + if (platform_booting()) { + return; + } + } elseif ($g['booting']) { + return; + } else { + if (is_service_running("asterisk")) { + restart_service("asterisk"); + } else { + start_service("asterisk"); + } + } + conf_mount_ro(); } diff --git a/pkg_config.10.xml b/pkg_config.10.xml index 37935d71..2eef4ebc 100644 --- a/pkg_config.10.xml +++ b/pkg_config.10.xml @@ -39,7 +39,7 @@ </descr> <website>http://www.asterisk.org/</website> <category>Services</category> - <version>0.3.3</version> + <version>0.3.4</version> <status>BETA</status> <required_version>2.2</required_version> <config_file>https://packages.pfsense.org/packages/config/asterisk/asterisk.xml</config_file> diff --git a/pkg_config.8.xml b/pkg_config.8.xml index 9c1890eb..f6737de3 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -34,7 +34,7 @@ <descr><![CDATA[Asterisk is an open source framework for building communications applications.<br />Asterisk turns an ordinary computer into a communications server.]]></descr> <website>http://www.asterisk.org/</website> <category>Services</category> - <version>1.8.26.1 pkg v0.3.3</version> + <version>1.8.26.1 pkg v0.3.4</version> <status>Beta</status> <required_version>2.0</required_version> <config_file>https://packages.pfsense.org/packages/config/asterisk/asterisk.xml</config_file> diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index 12782e93..5a75922a 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -34,7 +34,7 @@ <descr><![CDATA[Asterisk is an open source framework for building communications applications.<br />Asterisk turns an ordinary computer into a communications server.]]></descr> <website>http://www.asterisk.org/</website> <category>Services</category> - <version>1.8.26.1 pkg v0.3.3</version> + <version>1.8.26.1 pkg v0.3.4</version> <status>Beta</status> <required_version>2.0</required_version> <config_file>https://packages.pfsense.org/packages/config/asterisk/asterisk.xml</config_file> |