From aac50250294f90117b8cde4ca2900dc3633e9c69 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 20 Mar 2020 09:05:33 +0000 Subject: [PATCH] Added stop action for LSB compliance --- installers/servicestart.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/installers/servicestart.sh b/installers/servicestart.sh index 710d2b4b..ba87ba2c 100755 --- a/installers/servicestart.sh +++ b/installers/servicestart.sh @@ -22,8 +22,13 @@ case $key in ;; -s|--seconds) seconds="$2" - shift # past argument - shift # past value + shift + shift + ;; + -a|--action) + action="$2" + shift + shift ;; esac done @@ -36,6 +41,11 @@ systemctl stop hostapd.service systemctl stop dnsmasq.service systemctl stop dhcpcd.service +if [ "${action}" = "stop" ]; then + echo "Services stopped. Exiting." + exit 0 +fi + if [ -f "$DAEMONPATH" ]; then echo "Changing RaspAP Daemon --interface to $interface" sed -i "s/\(--interface \)[[:alnum:]]*/\1$interface/" "$DAEMONPATH"