From 59aac1588963567c3e907085ff651138b2743020 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sat, 21 Nov 2015 20:56:47 +0100 Subject: Do not restart asterisk on boot --- config/asterisk/asterisk.inc | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 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(); } -- cgit v1.2.3 From 4ee8eb4fab8330d63c3c6d5d3140ff4325bdd032 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sat, 21 Nov 2015 20:58:32 +0100 Subject: Bump asterisk package version --- pkg_config.10.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_config.10.xml b/pkg_config.10.xml index 4dfe3a56..634aba3e 100644 --- a/pkg_config.10.xml +++ b/pkg_config.10.xml @@ -39,7 +39,7 @@ http://www.asterisk.org/ Services - 0.3.3 + 0.3.4 BETA 2.2 https://packages.pfsense.org/packages/config/asterisk/asterisk.xml -- cgit v1.2.3 From a2448d7d5fd906311f790fd121b66b66b24294fd Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sat, 21 Nov 2015 20:59:39 +0100 Subject: Bump asterisk package version --- pkg_config.8.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_config.8.xml b/pkg_config.8.xml index a081c1be..09cb7d9f 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -34,7 +34,7 @@ Asterisk turns an ordinary computer into a communications server.]]> http://www.asterisk.org/ Services - 1.8.26.1 pkg v0.3.3 + 1.8.26.1 pkg v0.3.4 Beta 2.0 https://packages.pfsense.org/packages/config/asterisk/asterisk.xml -- cgit v1.2.3 From 86060cc98bfc6c65bb6181ac011cc5a928978fff Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sat, 21 Nov 2015 21:00:25 +0100 Subject: Bump asterisk package version --- pkg_config.8.xml.amd64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index 7113b826..1a8038b1 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -34,7 +34,7 @@ Asterisk turns an ordinary computer into a communications server.]]> http://www.asterisk.org/ Services - 1.8.26.1 pkg v0.3.3 + 1.8.26.1 pkg v0.3.4 Beta 2.0 https://packages.pfsense.org/packages/config/asterisk/asterisk.xml -- cgit v1.2.3