Create debian-event_guard.service

This commit is contained in:
FusionPBX 2022-07-25 19:28:18 -06:00 committed by GitHub
parent 17ab8e61ab
commit c8aaf80781
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
; Author: Mark J Crane <markjcrane@fusionpbx.com>
; cp /var/www/fusionpbx/app/switch/resources/service/debian-event_guard.service /etc/systemd/system/event_guard.service
; systemctl enable event_guard
; systemctl start event_guard
; systemctl daemon-reload
[Unit]
Description=FusionPBX Event Guard
Wants=network-online.target
Requires=network.target local-fs.target postgresql.service
After=network.target network-online.target local-fs.target postgresql.service
StartLimitIntervalSec=0
[Service]
Type=simple
;Type=forking
PIDFile=/var/run/fusionpbx/event_guard.pid
WorkingDirectory=/var/www/fusionpbx
;Environment="USER=www-data"
;Environment="GROUP=www-data"
;EnvironmentFile=-/etc/default/fusionpbx
ExecStartPre=/bin/mkdir -p /var/run/fusionpbx
;ExecStartPre=/bin/chown -R ${USER}:${GROUP} /var/www/fusionpbx
ExecStart=/usr/bin/php /var/www/fusionpbx/app/switch/resources/service/event_guard.php
TimeoutSec=55s
Restart=always
[Install]
WantedBy=multi-user.target
Also=