From 9a15e8e5105a24aac38df1cef06a1d70047b9ae3 Mon Sep 17 00:00:00 2001 From: punix Date: Tue, 14 Nov 2023 12:31:52 +0100 Subject: [PATCH] test remove --- wire_g | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/wire_g b/wire_g index aa76896..f575916 100755 --- a/wire_g +++ b/wire_g @@ -156,7 +156,7 @@ remove(){ pkill yad fi fi } -export -f remove + # function end ############################################################################################################ @@ -229,7 +229,7 @@ if selection=$(yad --no-klick --list --center \ --buttons-layout=center \ --button=$"Start:0" --button=$"Stop":"bash -c up_or_down" \ --button=$"Import":"bash -c import_wg" \ - --button=$"Remove":"bash -c remove" --separator="" \ + --button=$"Remove:4" --separator="" \ --button=$"About":"bash -c about" \ --window-icon=${wg_pic}wg-vpn.png \ --borders=8 --image-on-top --image=${wg_pic}wg-active.png \ @@ -250,6 +250,20 @@ if selection=$(yad --no-klick --list --center \ connect fi fi +ret=$? + +[[ $? -eq 1 ]] && exit 0 + +if [[ $ret -eq 4 ]] + then + remove +fi + +if [[ $ret -eq 5 ]] + then + about +fi + ############################################ END ##########################################################