mirror of
				https://github.com/byReqz/netset.git
				synced 2025-11-03 19:01:31 +00:00 
			
		
		
		
	added install check at start
This commit is contained in:
		
							
								
								
									
										11
									
								
								netset.sh
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								netset.sh
									
									
									
									
									
								
							@@ -2,7 +2,16 @@
 | 
				
			|||||||
# license: gpl-3
 | 
					# license: gpl-3
 | 
				
			||||||
echo "which networkmanager do you want to use?"
 | 
					echo "which networkmanager do you want to use?"
 | 
				
			||||||
echo "please enter the name or number of your choice"
 | 
					echo "please enter the name or number of your choice"
 | 
				
			||||||
echo "1. systemd-resolved"
 | 
					if [[ -n $(systemctl --version | grep -e "systemd") ]];then
 | 
				
			||||||
 | 
					    echo "1. systemd-resolved [installed]"
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					    echo "1. systemd-resolved [not installed]"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					if [[ -n $(NetworkManager -h | grep -e "Usage:") ]];then
 | 
				
			||||||
 | 
					    echo "2. NetworkManager [installed]"
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					    echo "2. NetworkManager [not installed]"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
read $c1
 | 
					read $c1
 | 
				
			||||||
if [[ "$c1" == "1" ]] || [[ "$c1" == "1." ]] || [[ "$c1" == "systemd-resolved" ]];then
 | 
					if [[ "$c1" == "1" ]] || [[ "$c1" == "1." ]] || [[ "$c1" == "systemd-resolved" ]];then
 | 
				
			||||||
    if [[ -z $(sudo systemctl status systemd-networkd | grep -e "dead") ]];then
 | 
					    if [[ -z $(sudo systemctl status systemd-networkd | grep -e "dead") ]];then
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user