From fd6cb7dd848da8f41bea1ffb92b8fea36bcd5aca Mon Sep 17 00:00:00 2001 From: punix Date: Wed, 29 Nov 2023 12:17:31 +0100 Subject: [PATCH] update aktiv edit --- wire_g | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/wire_g b/wire_g index 3ac1902..82db1ed 100755 --- a/wire_g +++ b/wire_g @@ -309,18 +309,32 @@ connect(){ # function end ############################################################################################################ -############################################################################################################ # --text "Aktiver TUNNEL: $ACTIVE # mit gewünschtes wort wird fett geschrieben. -# Farbe für Variable $ACTIVE festgelegt mit fetter Schrift. (bei --text zwischen " ") + if [[ ! -d ${WG_WDIR} || ! -e ${WG_WDIR}about.txt ]] then mkdir -p /home/"$USER"/.config/wg_nmcli echo FALSE TRUE > ${WG_WDIR}about.txt fi -#Here is update of Wire-G for future -#if AUTOUPDATE=$(grep 'TRUE TRUE\|FALSE TRUE' ${WG_WDIR}about.txt) -# then -# here comms command to update Wire-G -#fi +#Search on Updates +if AUTOUPDATE=$(grep 'TRUE TRUE\|FALSE TRUE' ${WG_WDIR}about.txt) + then + rm /tmp/CHANGELOG &> /dev/null + wget https://git.lunix.dedyn.io/punix/Wire-G/raw/branch/main/wg_nmcli/CHANGELOG -P /tmp + + UPDATE=$(diff -q /home/"$USER"/.local/share/wg_nmcli/CHANGELOG /tmp/CHANGELOG) + + if [[ -n "$UPDATE" ]] + then + yad --form --fixed \ + --borders=8 --buttons-layout=center --text-align=center \ + --button="OK" --undecorated \ + --image-on-top --image=${WG_PIC}wg-vpn-info.png \ + --separator=" " \ + --text=$"Update for Wireg-G is available. \n +Download Wire-G \n" + fi +fi +#Here is start Wire-G SELECTION=$(yad --no-klick --list --center \ --height=300 --width=60 --title="Wire-G" \ --buttons-layout=center \