FreePBXを始動スクリプトが必要であった
cat <<EOF > /etc/systemd/system/freepbx.service
[Unit]
Description=FreePBX VoIP Server
After=mariadb.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/fwconsole start
ExecStop=/usr/sbin/fwconsole stop
[Install]
WantedBy=multi-user.target
EOF
systemctl enable freepbx.service
ln -s ‘/etc/systemd/system/freepbx.service’ ‘/etc/systemd/system/multi-user.target.wants/freepbx.service’
systemctl start freepbx
systemctl status -l freepbx.service
FreePBXのrebootプログラム
vi /usr/local/bin/freepbx_reboot
#!/bin/sh
/usr/bin/systemctl stop freepbx
/usr/sbin/reboot
chmod +x /usr/local/bin/freepbx_reboot
定期的にrebootさせる
crontab -e
@monthly /usr/local/bin/freepbx_reboot
FreePBXのshutdownプログラム
#!/bin/sh
/usr/bin/systemctl stop freepbx
/usr/sbin/shutdown
chmod +x /usr/local/bin/freepbx_shutdown
コメント