From 4bee90c65db2bedfca870e1ed956597e231ae7d7 Mon Sep 17 00:00:00 2001 From: Adityashandilya555 Date: Sun, 5 Oct 2025 08:49:50 +0530 Subject: [PATCH 1/2] [auto-install] Fix OpenVPN container starting when disabled #490 When user selects 'n' to disable OpenVPN during auto-install, the script was setting VPN_DOMAIN to "example.com" instead of an empty string. This caused the OpenVPN container to still start and fail on systems without /dev/net/tun device. The existing logic in init_command.sh already handles this case by exiting when VPN_DOMAIN is empty. This change ensures the variable is properly set to empty when OpenVPN is disabled. Fixes #490 --- deploy/auto-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/auto-install.sh b/deploy/auto-install.sh index 356b79ef..a053bf2a 100755 --- a/deploy/auto-install.sh +++ b/deploy/auto-install.sh @@ -149,7 +149,7 @@ setup_docker_openwisp() { if [[ -z "$vpn_domain" ]]; then set_env "VPN_DOMAIN" "openvpn.${domain}" elif [[ "${vpn_domain,,}" == "n" ]]; then - set_env "VPN_DOMAIN" "example.com" + set_env "VPN_DOMAIN" "" else set_env "VPN_DOMAIN" "$vpn_domain" fi From c6e2d7e176d86431d52b897da271b50ca3f4a417 Mon Sep 17 00:00:00 2001 From: Adityashandilya555 Date: Mon, 6 Oct 2025 21:22:01 +0530 Subject: [PATCH 2/2] [auto-install] Fix bash 3.x compatibility for OpenVPN disable option #490 Replace bash 4.0+ specific syntax with explicit case checking to ensure compatibility with older bash versions. The parameter expansion syntax is not supported in bash 3.x, causing uppercase 'N' option to fail. Fixes case sensitivity issue where prompt shows 'N' but only lowercase 'n' was accepted on systems with bash versions prior to 4.0. --- deploy/auto-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/auto-install.sh b/deploy/auto-install.sh index a053bf2a..742b4abb 100755 --- a/deploy/auto-install.sh +++ b/deploy/auto-install.sh @@ -148,7 +148,7 @@ setup_docker_openwisp() { # VPN domain if [[ -z "$vpn_domain" ]]; then set_env "VPN_DOMAIN" "openvpn.${domain}" - elif [[ "${vpn_domain,,}" == "n" ]]; then + elif [[ "$vpn_domain" == "n" || "$vpn_domain" == "N" ]]; then set_env "VPN_DOMAIN" "" else set_env "VPN_DOMAIN" "$vpn_domain"