wg_notify and wire_g about new edit to start tun.
This commit is contained in:
19
wg_on_start
19
wg_on_start
@ -44,25 +44,6 @@ ACTIVE=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/
|
||||
# autoconnect wird hier abgeschalten damit auch neu importierte nach einem Systemneustart nicht aktiv sind
|
||||
IFS=$'\n' lines=( $(cat ${WG_WDIR}tunnel.txt) )
|
||||
nmcli con mod "$lines" connection.autoconnect no
|
||||
|
||||
if [ -d /home/$USER/.config/autostart ] # for GNOME, XFCE, KDE, Budgie
|
||||
then
|
||||
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
||||
then
|
||||
cp /home/"$USER"/.local/share/wg_nmcli/wgonstart.desktop /home/"$USER"/.config/autostart/
|
||||
else
|
||||
rm /home/"$USER"/.config/autostart/wgonstart.desktop
|
||||
fi
|
||||
|
||||
elif [ -d /home/$USER/.config/lxsession/Lubuntu/autostart ] # for LXDE
|
||||
then
|
||||
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
||||
then
|
||||
cp /home/"$USER"/.local/share/wg_nmcli/wgonstart.desktop /home/$USER/.config/lxsession/Lubuntu/autostart/
|
||||
else
|
||||
rm /home/$USER/.config/lxsession/Lubuntu/autostart/wgonstart.desktop
|
||||
fi
|
||||
fi
|
||||
|
||||
yad --notification \
|
||||
--image="${WG_PIC}wg-vpn.png" \
|
||||
|
Reference in New Issue
Block a user