Add simple systemd start / stop

This commit is contained in:
Steve N4IRS 2018-10-30 11:27:47 -04:00
parent e562de13f2
commit a9f889605f
3 changed files with 66 additions and 0 deletions

24
systemd/README.md Normal file
View File

@ -0,0 +1,24 @@
Copy required service file into /lib/systemd/system
To make the network-online.target available (required by HB service files)
systemctl enable systemd-networkd-wait-online.service
Example HB confbridge service
Enable the service at boot
systemctl enable hb_confbridge.service
Check the status of the service
systemctl status hb_confbridge.service
Start the service if stopped
systemctl start hb_confbridge.service
Restart the service
systemctl restart hb_confbridge.service
Stop the service if running
systemctl stop hb_confbridge.service
Disable starting the service at boot
systemctl disable hb_confbridge.service

View File

@ -0,0 +1,21 @@
[Unit]
Description=HB bridge all Service
# Description=Place this file in /lib/systemd/system
# Description=N4IRS 04/20/2018
# To make the network-online.target available
# systemctl enable systemd-networkd-wait-online.service
After=network-online.target syslog.target
Wants=network-online.target
[Service]
StandardOutput=null
WorkingDirectory=/opt/HBlink
RestartSec=3
ExecStart=/usr/bin/python /opt/HBlink/hb_bridge_all.py
Restart=on-abort
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,21 @@
[Unit]
Description=HB bridge conference bridge Service
# Description=Place this file in /lib/systemd/system
# Description=N4IRS 04/20/2018
# To make the network-online.target available
# systemctl enable systemd-networkd-wait-online.service
After=network-online.target syslog.target
Wants=network-online.target
[Service]
StandardOutput=null
WorkingDirectory=/opt/HBlink
RestartSec=3
ExecStart=/usr/bin/python /opt/HBlink/hb_confbridge.py
Restart=on-abort
[Install]
WantedBy=multi-user.target