mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Add systemd support to Asterisk + #2908 debug experiments
This commit is contained in:
parent
c3b43b93ff
commit
37805f7a4c
3 changed files with 27 additions and 11 deletions
|
@ -1,7 +1,12 @@
|
||||||
# 2021-08-03: Asterisk's own install_prereq (below) handles these?
|
# 2021-08-05: Asterisk's own install_prereq (below) handles most all of these
|
||||||
#- name: Asterisk - Install dependencies
|
#- name: Asterisk - Install dependencies
|
||||||
# include: asterisk_dependencies.yml
|
# include: asterisk_dependencies.yml
|
||||||
|
|
||||||
|
- name: Install package 'libsystemd-dev' so Asterisk compiles in systemd support -- after '/* #undef HAVE_SYSTEMD */' becomes '#undef HAVE_SYSTEMD' in /opt/iiab/asterisk/include/asterisk/autoconfig.h -- per https://community.asterisk.org/t/systemctl-start-asterisk-is-fail-with-timeout/81123/3 and https://github.com/asterisk/asterisk/blob/master/contrib/systemd/asterisk.service
|
||||||
|
package:
|
||||||
|
name: libsystemd-dev
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Asterisk - Download {{ asterisk_url }}/{{ asterisk_src_file }} to {{ downloads_dir }}
|
- name: Asterisk - Download {{ asterisk_url }}/{{ asterisk_src_file }} to {{ downloads_dir }}
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ asterisk_url }}/{{ asterisk_src_file }}"
|
url: "{{ asterisk_url }}/{{ asterisk_src_file }}"
|
||||||
|
@ -74,7 +79,7 @@
|
||||||
args:
|
args:
|
||||||
chdir: "{{ asterisk_src_dir }}"
|
chdir: "{{ asterisk_src_dir }}"
|
||||||
|
|
||||||
- name: Asterisk - Run 'make' - CAN TAKE 30 MIN OR LONGER!
|
- name: Asterisk - Run 'make' - CAN TAKE 8-30 MIN OR LONGER!
|
||||||
command: make
|
command: make
|
||||||
args:
|
args:
|
||||||
chdir: "{{ asterisk_src_dir }}"
|
chdir: "{{ asterisk_src_dir }}"
|
||||||
|
@ -97,10 +102,16 @@
|
||||||
chdir: "{{ asterisk_src_dir }}"
|
chdir: "{{ asterisk_src_dir }}"
|
||||||
|
|
||||||
- name: Asterisk - Run 'ldconfig'
|
- name: Asterisk - Run 'ldconfig'
|
||||||
shell: ldconfig
|
command: ldconfig
|
||||||
args:
|
args:
|
||||||
chdir: "{{ asterisk_src_dir }}"
|
chdir: "{{ asterisk_src_dir }}"
|
||||||
|
|
||||||
|
# - name: 2021-08-05 EXPERIMENTALLY RUN 'update-rc.d -f asterisk remove' similar to 'systemctl disable asterisk' as recommended by https://wiki.freepbx.org/display/FOP/Installing+FreePBX+16+on+Debian+10.9
|
||||||
|
# command: update-rc.d -f asterisk remove
|
||||||
|
|
||||||
|
|
||||||
|
- pause:
|
||||||
|
|
||||||
|
|
||||||
- name: Asterisk - Ensure group 'asterisk' exists
|
- name: Asterisk - Ensure group 'asterisk' exists
|
||||||
group:
|
group:
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
- name: Asterisk - Install dependencies
|
- name: Asterisk - Install dependencies
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- git
|
- git # Not visible in install_prereq
|
||||||
- curl
|
- curl # Not visible in install_prereq
|
||||||
- wget
|
- wget
|
||||||
- libnewt-dev
|
- libnewt-dev
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
- libncurses5-dev
|
- libncurses5-dev # Not visible in install_prereq
|
||||||
- subversion
|
- subversion
|
||||||
- libsqlite3-dev
|
- libsqlite3-dev
|
||||||
- build-essential
|
- build-essential
|
||||||
|
|
|
@ -116,7 +116,7 @@
|
||||||
# dest: "{{ freepbx_install_dir }}/admin/libraries/view.functions.php"
|
# dest: "{{ freepbx_install_dir }}/admin/libraries/view.functions.php"
|
||||||
|
|
||||||
|
|
||||||
- name: FreePBX - 4-step install (just run once) - CAN TAKE 12 MIN OR LONGER!
|
- name: FreePBX - 4-step install (just run once) - CAN TAKE 3-12 MIN OR LONGER!
|
||||||
command: "{{ item }}"
|
command: "{{ item }}"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ freepbx_src_dir }}"
|
chdir: "{{ freepbx_src_dir }}"
|
||||||
|
@ -125,8 +125,10 @@
|
||||||
- ./start_asterisk start
|
- ./start_asterisk start
|
||||||
- ./install -n --webroot {{ freepbx_install_dir }} --dbuser {{ asterisk_db_user }} --dbpass {{ asterisk_db_password }} --dbname {{ asterisk_db_dbname }} --cdrdbname {{ asterisk_db_cdrdbname }}
|
- ./install -n --webroot {{ freepbx_install_dir }} --dbuser {{ asterisk_db_user }} --dbpass {{ asterisk_db_password }} --dbname {{ asterisk_db_dbname }} --cdrdbname {{ asterisk_db_cdrdbname }}
|
||||||
# - ./start_asterisk stop
|
# - ./start_asterisk stop
|
||||||
- killall -9 safe_asterisk # 2021-08-05: Thanks to @jvonau's PR $2912, these 2 lines are a (brute force for now!) workaround to the intermittent #2908
|
#- killall -9 safe_asterisk # 2021-08-05: Thanks to @jvonau's PR $2912, these 2 lines attempt a (brute force for now, not enough?!) workaround to intermittent
|
||||||
- killall -9 asterisk # install issue of 'systemctl status freepbx' showing "Unable to run Pre-Asterisk hooks, because Asterisk is already running"
|
#- killall -9 asterisk # #2908 install issue of 'systemctl status freepbx' showing "Unable to run Pre-Asterisk hooks, because Asterisk is already running"
|
||||||
|
|
||||||
|
- pause:
|
||||||
|
|
||||||
# - name: 'FreePBX - fix file permissions for NGINX: /etc/freepbx.conf (0644), /var/log/asterisk/freepbx.log (0666)'
|
# - name: 'FreePBX - fix file permissions for NGINX: /etc/freepbx.conf (0644), /var/log/asterisk/freepbx.log (0666)'
|
||||||
# file:
|
# file:
|
||||||
|
@ -147,7 +149,7 @@
|
||||||
# # - /var/www/html/freepbx/admin/assets/less/cache
|
# # - /var/www/html/freepbx/admin/assets/less/cache
|
||||||
# - /var/spool/asterisk/cache
|
# - /var/spool/asterisk/cache
|
||||||
|
|
||||||
- name: FreePBX - Install /etc/odbc.ini from template (root:root, 0644 by default)
|
- name: FreePBX - Install /etc/odbc.ini from template (root:root, 0644 by default) - in future consider compiling ODBC driver for aarch64 per http://mghadam.blogspot.com/2021/03/install-asterisk-18-freepbx-15-on.html ?
|
||||||
template:
|
template:
|
||||||
src: odbc.ini
|
src: odbc.ini
|
||||||
dest: /etc/
|
dest: /etc/
|
||||||
|
@ -170,3 +172,6 @@
|
||||||
path: /etc/apache2/ports.conf
|
path: /etc/apache2/ports.conf
|
||||||
line: "Listen {{ pbx_http_port }}"
|
line: "Listen {{ pbx_http_port }}"
|
||||||
# insertafter: Listen 80
|
# insertafter: Listen 80
|
||||||
|
|
||||||
|
|
||||||
|
- pause:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue