1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Asterisk fails to start reliably: can freepbx.service's fwconsole work??

This commit is contained in:
A Holt 2021-08-04 12:26:26 -04:00 committed by GitHub
parent 90d15879fd
commit 531b1d0ddd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,18 +1,29 @@
- name: Enable & (Re)start 'asterisk' systemd service (if pbx_enabled) # 2021-08-04: This stanza commonly causes systemd error "Asterisk is already
systemd: # running. /etc/init.d/asterisk will exit now" (initial installs especially?)
daemon_reload: yes #
name: asterisk # Also 'systemctl restart freepbx' all alone during initial install -- is
enabled: yes # likewise unreliable -- as confirmed on both Ubuntu 20.04 and Debian 11 :/
state: restarted #
when: pbx_enabled # Yes /etc/systemd/system/freepbx.service is supposed to run 'fwconsole stop'
# then 'fwconsole start' reliably, as many web posts recommend, But No Dice :/
#
# Do we need something like 'RestartSec=3' in freepbx.service ??
#
#- name: Enable & (Re)start 'asterisk' systemd service (if pbx_enabled)
# systemd:
# daemon_reload: yes
# name: asterisk
# enabled: yes
# state: restarted
# when: pbx_enabled
- name: Disable & Stop 'asterisk' systemd service (if not pbx_enabled) #- name: Disable & Stop 'asterisk' systemd service (if not pbx_enabled)
systemd: # systemd:
daemon_reload: yes # daemon_reload: yes
name: asterisk # name: asterisk
enabled: no # enabled: no
state: stopped # state: stopped
when: not pbx_enabled # when: not pbx_enabled
- name: Enable & (Re)start 'freepbx' systemd service (if pbx_enabled) - name: Enable & (Re)start 'freepbx' systemd service (if pbx_enabled)