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:
@@ -325,7 +325,9 @@ function patch_system_files() {
|
||||
"/bin/systemctl start dnsmasq.service"
|
||||
"/bin/systemctl stop dnsmasq.service"
|
||||
"/bin/systemctl start openvpn-client@client"
|
||||
"/bin/systemctl enable openvpn-client@client"
|
||||
"/bin/systemctl stop openvpn-client@client"
|
||||
"/bin/systemctl disable openvpn-client@client"
|
||||
"/bin/cp /tmp/ovpnclient.ovpn /etc/openvpn/client/client.conf"
|
||||
"/bin/cp /tmp/authdata /etc/openvpn/client/login.conf"
|
||||
"/bin/cp /tmp/dnsmasqdata /etc/dnsmasq.conf"
|
||||
|
||||
@@ -34,7 +34,8 @@ lines=(
|
||||
|
||||
for line in "${lines[@]}"; do
|
||||
if grep "$line" /etc/rc.local > /dev/null; then
|
||||
else
|
||||
echo "$line: Line already added"
|
||||
else
|
||||
sudo sed -i "s/^exit 0$/$line\nexit 0/" /etc/rc.local
|
||||
echo "Adding rule: $line"
|
||||
fi
|
||||
|
||||
@@ -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