notify wg_on_start hinzugefügt
This commit is contained in:
parent
db2799eab3
commit
3d27bdde18
16
wg_on_start
16
wg_on_start
@ -40,15 +40,13 @@ WG_PIC="/home/$USER/.icons/"
|
||||
# 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 AUTOSTART=$(grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt)
|
||||
# then
|
||||
# nmcli con mod "$ACTIVE" connection.autoconnect yes
|
||||
# if [ -d /etc/xdg/autostart ]
|
||||
# then
|
||||
# echo "Autostartordner in /etc/xdg/ gefunden"
|
||||
# elif [ -d /usr/share/autostart ]
|
||||
# then
|
||||
# fi
|
||||
|
||||
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
||||
then
|
||||
chmod +x /home/"$USER"/.local/bin/wg_on_start
|
||||
else
|
||||
chmod -x /home/"$USER"/.local/bin/wg_on_start
|
||||
fi
|
||||
yad --notification \
|
||||
--image="${WG_PIC}wg-vpn.png" \
|
||||
--icon-size=32 --no-middle \
|
||||
|
20
wire_g
20
wire_g
@ -52,15 +52,14 @@ wg_notify(){
|
||||
# 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 AUTOSTART=$(grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt)
|
||||
# then
|
||||
# nmcli con mod "$ACTIVE" connection.autoconnect yes
|
||||
# if [ -d /etc/xdg/autostart ]
|
||||
# then
|
||||
# echo "Autostartordner in /etc/xdg/ gefunden"
|
||||
# elif [ -d /usr/share/autostart ]
|
||||
# then
|
||||
# fi
|
||||
|
||||
if grep 'TRUE TRUE\|TRUE FALSE' ${WG_WDIR}about.txt
|
||||
then
|
||||
chmod +x /home/"$USER"/.local/bin/wg_on_start
|
||||
else
|
||||
chmod -x /home/"$USER"/.local/bin/wg_on_start
|
||||
fi
|
||||
|
||||
yad --notification \
|
||||
--image="${WG_PIC}wg-vpn.png" \
|
||||
--icon-size=32 --no-middle \
|
||||
@ -261,8 +260,7 @@ fi
|
||||
connect(){
|
||||
|
||||
if SUCCESS=$(grep -i 'erfolgreich aktiviert\|successfully activated' ${WG_WDIR}.tmp.txt)
|
||||
then
|
||||
nmcli con mod $SELECTION connection.autoconnect no
|
||||
then
|
||||
wg_notify
|
||||
|
||||
fi }
|
||||
|
Loading…
x
Reference in New Issue
Block a user