update aktiv edit

This commit is contained in:
Désiré Werner Menrath 2023-11-29 12:17:31 +01:00
parent dd7c42bbc0
commit fd6cb7dd84

28
wire_g
View File

@ -309,18 +309,32 @@ connect(){
# function end # function end
############################################################################################################ ############################################################################################################
############################################################################################################ # --text "<b>Aktiver TUNNEL:</b> <span color='#0fad0a'><b>$ACTIVE</b></span> # mit <b>gewünschtes wort</b> wird fett geschrieben.
# Farbe für Variable $ACTIVE festgelegt mit fetter Schrift. (bei --text zwischen " ")
if [[ ! -d ${WG_WDIR} || ! -e ${WG_WDIR}about.txt ]] if [[ ! -d ${WG_WDIR} || ! -e ${WG_WDIR}about.txt ]]
then then
mkdir -p /home/"$USER"/.config/wg_nmcli mkdir -p /home/"$USER"/.config/wg_nmcli
echo FALSE TRUE > ${WG_WDIR}about.txt echo FALSE TRUE > ${WG_WDIR}about.txt
fi fi
#Here is update of Wire-G for future #Search on Updates
#if AUTOUPDATE=$(grep 'TRUE TRUE\|FALSE TRUE' ${WG_WDIR}about.txt) if AUTOUPDATE=$(grep 'TRUE TRUE\|FALSE TRUE' ${WG_WDIR}about.txt)
# then then
# here comms command to update Wire-G rm /tmp/CHANGELOG &> /dev/null
#fi 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=$"<span>Update for Wireg-G is available.</span> \n
<a href='https://git.lunix.dedyn.io/punix/Wire-G'>Download Wire-G </a> \n"
fi
fi
#Here is start Wire-G
SELECTION=$(yad --no-klick --list --center \ SELECTION=$(yad --no-klick --list --center \
--height=300 --width=60 --title="Wire-G" \ --height=300 --width=60 --title="Wire-G" \
--buttons-layout=center \ --buttons-layout=center \