remove update

This commit is contained in:
Désiré Werner Menrath 2023-11-23 18:30:44 +01:00
parent 9a228051b7
commit abf91112c1

20
wire_g
View File

@ -137,9 +137,12 @@ remove(){
then then
yad --window-icon=${WG_PIC}wg-trash.png --undecorated \ yad --window-icon=${WG_PIC}wg-trash.png --undecorated \
--image-on-top --image=${WG_PIC}wg-trash-info.png \ --image-on-top --image=${WG_PIC}wg-trash-info.png \
--text=$"Your Tunnel $SELECTION was successfully deleted." \ --text=$"<span>Your Tunnel $SELECTION was successfully deleted.</span> \n
<span>Attention! The autostart was reset.</span> \n
<span>If you need the autosart for another tunnel,</span> \n
<span>so please activate it again.</span> \n" \
--text-align=center --button=$"OK" \ --text-align=center --button=$"OK" \
--center --buttons-layout=center --borders=8 --fixed --buttons-layout=center --borders=8
else else
yad --window-icon=${WG_PIC}wg-trash.png --undecorated \ yad --window-icon=${WG_PIC}wg-trash.png --undecorated \
--image-on-top --image=${WG_PIC}wg-trash-info.png \ --image-on-top --image=${WG_PIC}wg-trash-info.png \
@ -152,7 +155,18 @@ remove(){
then then
IFS=$'\n' lines=( $(cat ${WG_WDIR}for-kill_pid.txt) ) IFS=$'\n' lines=( $(cat ${WG_WDIR}for-kill_pid.txt) )
kill $lines kill $lines
fi } fi
if grep 'TRUE TRUE' ${WG_WDIR}about.txt
then
echo FALSE TRUE > ${WG_WDIR}about.txt
elif grep 'TRUE FALSE' ${WG_WDIR}about.txt
then
echo FALSE FALSE > ${WG_WDIR}about.txt
fi
rm /home/$USER/.config/autostart/wgonstart.desktop
}
# function end # function end
############################################################################################################ ############################################################################################################