mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Added stop action for LSB compliance
This commit is contained in:
parent
de2ded1984
commit
aac5025029
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user