test 4 while
This commit is contained in:
		
							
								
								
									
										7
									
								
								wire_g
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								wire_g
									
									
									
									
									
								
							@@ -79,7 +79,8 @@ import_wg(){
 | 
			
		||||
                 --window-icon=${wg_pic}wg-import.png \
 | 
			
		||||
                 ----filename=*.conf --no-click
 | 
			
		||||
                 --title=$"Wireguard .conf Select file")
 | 
			
		||||
 | 
			
		||||
    while [ ! $wgconf ] 
 | 
			
		||||
    do
 | 
			
		||||
    case "$wgconf" in
 | 
			
		||||
 | 
			
		||||
        *_*.conf) if grep -i 'PEER\|PublicKey' $wgconf  > /dev/null &&  grep -i 'Interface\|PrivateKey' $wgconf > /dev/null
 | 
			
		||||
@@ -104,8 +105,8 @@ import_wg(){
 | 
			
		||||
                       --text $"<b>Oh, something went wrong.</b> \n
 | 
			
		||||
<b>No valid Wireguard file.</b> \n 
 | 
			
		||||
<b>Here is an example:</b><span color='#0fad0a'><b> my_wireguard.conf</b></span> \n" ;;
 | 
			
		||||
    esac 
 | 
			
		||||
import_wg 
 | 
			
		||||
    esac
 | 
			
		||||
    done  
 | 
			
		||||
}
 | 
			
		||||
export -f import_wg
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user