aboutsummaryrefslogtreecommitdiffstats
path: root/main/openvpn/openvpn.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/openvpn/openvpn.initd')
-rw-r--r--main/openvpn/openvpn.initd2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/openvpn/openvpn.initd b/main/openvpn/openvpn.initd
index 33cb01ddae..407bf0ca58 100644
--- a/main/openvpn/openvpn.initd
+++ b/main/openvpn/openvpn.initd
@@ -30,7 +30,7 @@ required_files="$cfgfile"
# cfgfile as in old version of this runscript. Eventually we try to fix the
# config when checkconfig() is run.
# This is for backward compatibility with Alpine < v3.8.
-if [ -z "$client_mode" ]; then
+if [ -z "$client_mode" ] && [ -f "$cfgfile" ]; then
yesno "${DETECT_CLIENT:-yes}" && grep -q '^\s*remote\s' "$cfgfile" \
&& client_mode=yes \
|| client_mode=no