Compare commits
No commits in common. "0af59472346bab84bc67cb8d950084951bbce89b" and "035179c8088541f0bd08d81b1f433b71e92903c5" have entirely different histories.
0af5947234
...
035179c808
14
wg_on_start
14
wg_on_start
@ -35,11 +35,15 @@ ACTIVE=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/
|
|||||||
#
|
#
|
||||||
# *) OPEN=open ;;
|
# *) OPEN=open ;;
|
||||||
# esac
|
# esac
|
||||||
yad --image-on-top --image=${WG_PIC}wg-vpn-info.png \
|
yad --image-on-top --image=${WG_PIC}wg-vpn-info.png \
|
||||||
--undecorated --borders=8 --skip-taskbar \
|
--undecorated --borders=8 --skip-taskbar \
|
||||||
--text-align=center --no-buttons --auto-close \
|
--text-align=center --no-buttons --auto-close \
|
||||||
--timeout 1 \
|
--timeout 1 \
|
||||||
--text=$"<span color='#0fad0a'><b>$ACTIVE</b></span> <span><b>powered</b></span>"
|
--text=$"<span color='#0fad0a'><b>$ACTIVE</b></span> <span><b>powered</b></span>"
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
yad --notification \
|
yad --notification \
|
||||||
--image="${WG_PIC}wg-vpn.png" \
|
--image="${WG_PIC}wg-vpn.png" \
|
||||||
|
8
wire_g
8
wire_g
@ -37,7 +37,7 @@ ACTIVE=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/
|
|||||||
############################################################################################################
|
############################################################################################################
|
||||||
|
|
||||||
wg_notify(){
|
wg_notify(){
|
||||||
sleep 1
|
sleep 2
|
||||||
nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//' &> ${WG_WDIR}onstart.txt
|
nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//' &> ${WG_WDIR}onstart.txt
|
||||||
ACTIVE=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//')
|
ACTIVE=$(nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//')
|
||||||
case $LANG in
|
case $LANG in
|
||||||
@ -51,6 +51,9 @@ wg_notify(){
|
|||||||
--text-align=center --no-buttons --auto-close \
|
--text-align=center --no-buttons --auto-close \
|
||||||
--timeout 1 \
|
--timeout 1 \
|
||||||
--text=$"<span color='#0fad0a'><b>$ACTIVE</b></span> <span><b>powered</b></span>"
|
--text=$"<span color='#0fad0a'><b>$ACTIVE</b></span> <span><b>powered</b></span>"
|
||||||
|
# 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
|
||||||
|
|
||||||
yad --notification \
|
yad --notification \
|
||||||
--image="${WG_PIC}wg-vpn.png" \
|
--image="${WG_PIC}wg-vpn.png" \
|
||||||
@ -104,8 +107,7 @@ import_wg(){
|
|||||||
kill $lines
|
kill $lines
|
||||||
nmcli connection import type wireguard file $WG_CONF &> ${WG_WDIR}.tmp.txt
|
nmcli connection import type wireguard file $WG_CONF &> ${WG_WDIR}.tmp.txt
|
||||||
wg_notify
|
wg_notify
|
||||||
fi
|
fi
|
||||||
nmcli con mod "$WG_CONF" connection.autoconnect no
|
|
||||||
nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//' &> ${WG_WDIR}onstart.txt
|
nmcli connection show --active | grep -iPo "(.*)(wireguard)" | sed 's/ .*//' &> ${WG_WDIR}onstart.txt
|
||||||
fi ;;
|
fi ;;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user