Test and indicate status

This added function tests if pihole-FTL is running when the sysV.

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
pull/2207/head
Rob Gill 6 years ago committed by GitHub
parent 1a30043776
commit 83ff0055b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -69,13 +69,25 @@ stop() {
echo
}
# Indicate the service status
status() {
if is_running; then
echo "[ ok ] pihole-FTL is running"
exit 0
else
echo "[ ] pihole-FTL is not running"
exit 1
fi
}
### main logic ###
case "$1" in
stop)
stop
;;
status)
status pihole-FTL
status
;;
start|restart|reload|condrestart)
stop

Loading…
Cancel
Save