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