Example systemd startup script for FreePBX
As most distributions have moved to systemd, here's an example startup script that you may customize for your installation.
This has been tested to work on CentOS 7.
Contents of /etc/systemd/system/freepbx.service
[Unit]
Description=FreePBX VoIP Server
After=mariadb.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/fwconsole start -q
ExecStop=/usr/sbin/fwconsole stop -q
[Install]
WantedBy=multi-user.target
|
From there you can enable it so it starts automatically
Note that on Debian 8.1, you need to use After=mysql.service, not After=mariadb.service.
[root@firewall ~]# systemctl enable freepbx.service
ln -s '/etc/systemd/system/freepbx.service' '/etc/systemd/system/multi-user.target.wants/freepbx.service'
[root@firewall ~]# |
And then start it yourself if you haven't already
[root@firewall ~]# systemctl start freepbx
[root@firewall ~]# |
You can check the output of the startup with the 'systemctl status' command