mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
ovpn, uap0 compatibility; readme
This commit is contained in:
@@ -7,6 +7,7 @@ NAME=raspap
|
||||
DESC="Service control for RaspAP"
|
||||
CONFIGFILE="/etc/raspap/hostapd.ini"
|
||||
DAEMONPATH="/lib/systemd/system/raspap.service"
|
||||
OPENVPNENABLED=$(pidof openvpn | wc -l)
|
||||
|
||||
positional=()
|
||||
while [[ $# -gt 0 ]]
|
||||
@@ -29,6 +30,7 @@ done
|
||||
set -- "${positional[@]}"
|
||||
|
||||
echo "Stopping network services..."
|
||||
systemctl stop openvpn-client@client
|
||||
systemctl stop systemd-networkd
|
||||
systemctl stop hostapd.service
|
||||
systemctl stop dnsmasq.service
|
||||
@@ -51,6 +53,9 @@ if [ -r "$CONFIGFILE" ]; then
|
||||
ip link set down eth0
|
||||
ip link set up eth0
|
||||
|
||||
echo "Removing uap0 interface..."
|
||||
iw dev uap0 del
|
||||
|
||||
echo "Enabling systemd-networkd"
|
||||
systemctl start systemd-networkd
|
||||
systemctl enable systemd-networkd
|
||||
@@ -87,5 +92,9 @@ sleep "${seconds}"
|
||||
|
||||
systemctl start dnsmasq.service
|
||||
|
||||
if [ $OPENVPNENABLED -eq 1 ]; then
|
||||
systemctl start openvpn-client@client
|
||||
fi
|
||||
|
||||
echo "RaspAP service start DONE"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user