mirror of
				https://github.com/angristan/openvpn-install.git
				synced 2025-10-31 05:57:36 +01:00 
			
		
		
		
	Print warning about empty public interface (#581)
Warning, if cannot detect public interface, and give user a choice to continue or abord.
This commit is contained in:
		| @@ -610,6 +610,19 @@ function installOpenVPN () { | ||||
| 		NIC=$(ip -6 route show default | sed -ne 's/^default .* dev \([^ ]*\) .*$/\1/p') | ||||
| 	fi | ||||
|  | ||||
| 	# $NIC can not be empty for script rm-openvpn-rules.sh | ||||
|         if [[ -z "$NIC" ]]; then | ||||
|                 echo | ||||
|                 echo "Can not detect public interface." | ||||
|                 echo "This needs for setup MASQUERADE." | ||||
|                 until [[ $CONTINUE =~ (y|n) ]]; do | ||||
|                         read -rp "Continue? [y/n]: " -e CONTINUE | ||||
|                 done | ||||
|                 if [[ "$CONTINUE" = "n" ]]; then | ||||
|                         exit 1 | ||||
|                 fi | ||||
|         fi | ||||
|  | ||||
| 	if [[ "$OS" =~ (debian|ubuntu) ]]; then | ||||
| 		apt-get update | ||||
| 		apt-get -y install ca-certificates gnupg | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Henry N
					Henry N