mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-22 07:30:23 +00:00
test for $interface before changing daemon, chk status of br0
This commit is contained in:
parent
17d62acdd6
commit
892a88e3cc
2 changed files with 9 additions and 6 deletions
|
@ -16,7 +16,7 @@ After=multi-user.target
|
|||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/bash /etc/raspap/hostapd/servicestart.sh --interface uap0 --seconds 3
|
||||
ExecStart=/bin/bash /etc/raspap/hostapd/servicestart.sh --seconds 3
|
||||
RemainAfterExit=no
|
||||
|
||||
[Install]
|
||||
|
|
|
@ -48,7 +48,7 @@ if [ "${action}" = "stop" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f "$DAEMONPATH" ]; then
|
||||
if [ -f "$DAEMONPATH" ] && [ ! -z "$interface" ]; then
|
||||
echo "Changing RaspAP Daemon --interface to $interface"
|
||||
sed -i "s/\(--interface \)[[:alnum:]]*/\1$interface/" "$DAEMONPATH"
|
||||
fi
|
||||
|
@ -77,11 +77,14 @@ if [ -r "$CONFIGFILE" ]; then
|
|||
fi
|
||||
else
|
||||
echo "Disabling systemd-networkd"
|
||||
- systemctl disable systemd-networkd
|
||||
systemctl disable systemd-networkd
|
||||
|
||||
echo "Removing br0 interface..."
|
||||
ip link set down br0
|
||||
ip link del dev br0
|
||||
ip link ls up | grep -q 'br0' &> /dev/null
|
||||
if [ $? == 0 ]; then
|
||||
echo "Removing br0 interface..."
|
||||
ip link set down br0
|
||||
ip link del dev br0
|
||||
fi
|
||||
|
||||
if [ "${config[WifiAPEnable]}" = 1 ]; then
|
||||
if [ "${interface}" = "uap0" ]; then
|
||||
|
|
Loading…
Reference in a new issue