1
0
mirror of https://github.com/nttgin/BGPalerter.git synced 2024-05-19 06:50:08 +00:00

Update linux-service.md

This commit is contained in:
Massimo Candela
2020-04-29 22:35:27 +02:00
committed by GitHub
parent cf91bea054
commit e58c2e37af

View File

@@ -1,4 +1,4 @@
## Run BGPAlerter as a Linux Service ## Run BGPalerter as a Linux Service
If you are interested in running this application as a service on a Linux server here is a basic guide covering how to do that. This process works for RHEL 7 based Linux installations. It will likely work very similiarly on other systemctl enabled installations. If you are interested in running this application as a service on a Linux server here is a basic guide covering how to do that. This process works for RHEL 7 based Linux installations. It will likely work very similiarly on other systemctl enabled installations.
### Create directory for the application to reside ### Create directory for the application to reside
@@ -19,7 +19,7 @@ The contents of this file should be as follows:
``` ```
[Unit] [Unit]
Description=BGPAlerter Description=BGPalerter
After=network.target After=network.target
[Service] [Service]
@@ -37,7 +37,7 @@ Reload systemd to register the new configuration.
`systemctl daemon-reload` `systemctl daemon-reload`
### Enable and start the service ### Enable and start the service
Enable bgpalerter to start at boot and then start the service. Enable BGPalerter to start at boot and then start the service.
`systemctl enable bgpalerter` `systemctl enable bgpalerter`
@@ -62,15 +62,15 @@ do
echo "--restart Restart the Services" echo "--restart Restart the Services"
elif [ "$arg" == "--start" ] elif [ "$arg" == "--start" ]
then then
echo "Starting BGPAlerter" echo "Starting BGPalerter"
systemctl start bgpalerter.service systemctl start bgpalerter.service
elif [ "$arg" == "--stop" ] elif [ "$arg" == "--stop" ]
then then
echo "Stopping BGPAlerter" echo "Stopping BGPalerter"
systemctl stop bgpalerter.service systemctl stop bgpalerter.service
elif [ "$arg" == "--restart" ] elif [ "$arg" == "--restart" ]
then then
echo "Restarting BGPAlerter" echo "Restarting BGPalerter"
systemctl restart bgpalerter.service systemctl restart bgpalerter.service
fi fi
done done