test mit kill
This commit is contained in:
		
							
								
								
									
										5
									
								
								wg_stop
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								wg_stop
									
									
									
									
									
								
							@@ -30,7 +30,7 @@ export TEXTDOMAINDIR="/usr/share/locale"
 | 
			
		||||
  VALUE=$"*_*"
 | 
			
		||||
    for VALUE in "${lines[@]}"
 | 
			
		||||
    do 
 | 
			
		||||
      # hier wird die Ausgabe von nmcli für die ausVALUEung in die .stop.txt gespeichert
 | 
			
		||||
      # hier wird die Ausgabe von nmcli für die auswertung in die .stop.txt gespeichert
 | 
			
		||||
      nmcli connection down "$VALUE" &> ${WG_WDIR}.stop.txt 
 | 
			
		||||
      if disable=$(grep -i 'deaktiviert\|deactivated' ${WG_WDIR}.stop.txt)
 | 
			
		||||
          then 
 | 
			
		||||
@@ -41,7 +41,8 @@ export TEXTDOMAINDIR="/usr/share/locale"
 | 
			
		||||
                  --text=$"<span color='#0fad0a'><b>"$VALUE" Connection disconnected</b></span>"
 | 
			
		||||
      fi
 | 
			
		||||
    done 
 | 
			
		||||
pkill yad
 | 
			
		||||
  IFS=$'\n' lines=( $(cat ${WG_WDIR}Notify_PID.txt) )
 | 
			
		||||
    kill $lines > /dev/null 2>&1 
 | 
			
		||||
 | 
			
		||||
#################################   END   ##################################################################
 | 
			
		||||
############################################################################################################ 
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								wire_g
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								wire_g
									
									
									
									
									
								
							@@ -60,9 +60,10 @@ wg_notify(){
 | 
			
		||||
    --text=$"$ACTIVE activ" \
 | 
			
		||||
    --menu="Wire-G $OPEN!/sbin/wire_g
 | 
			
		||||
    |$ACTIVE stop!/sbin/wg_stop" \
 | 
			
		||||
    --command="menu"
 | 
			
		||||
    --command="menu" &
 | 
			
		||||
# Schreib die pid von Notify in 
 | 
			
		||||
    ps aux | grep yad | grep -v grep | awk '{print $2}' > ${WG_WDIR}Notify_PID.txt
 | 
			
		||||
    pid=$(ps aux | grep yad | grep -v grep | awk '{print $2}')
 | 
			
		||||
    echo $pid > ${WG_WDIR}Notify_PID.txt
 | 
			
		||||
}   
 | 
			
		||||
export -f wg_notify
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user