From e3fb79d43503d0e7cf5789e489cb2d3b3b5f5514 Mon Sep 17 00:00:00 2001 From: piyushkhobragade Date: Sat, 28 Mar 2026 13:30:49 +0000 Subject: [PATCH] [fix] Handle missing VPN_DOMAIN safely in OpenVPN startup #572 Avoid container failure when VPN_DOMAIN is unset by logging a warning and exiting gracefully. Fixes #572 --- images/common/init_command.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/images/common/init_command.sh b/images/common/init_command.sh index b5d67895..cef67796 100644 --- a/images/common/init_command.sh +++ b/images/common/init_command.sh @@ -29,7 +29,10 @@ elif [ "$MODULE_NAME" = 'freeradius' ]; then source docker-entrypoint.sh -X fi elif [ "$MODULE_NAME" = 'openvpn' ]; then - if [[ -z "$VPN_DOMAIN" ]]; then exit; fi + if [ -z "$VPN_DOMAIN" ]; then + echo "WARNING: VPN_DOMAIN not set, skipping OpenVPN setup" >&2 + exit 0 + fi wait_nginx_services openvpn_preconfig openvpn_config