From f142f533446e474c70e0cc54ba1d4e2e583f71b6 Mon Sep 17 00:00:00 2001 From: MarkusMcNugen Date: Wed, 25 Apr 2018 23:37:48 -0400 Subject: [PATCH] Update start.sh --- openvpn/start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openvpn/start.sh b/openvpn/start.sh index 7b314f7..470b16b 100755 --- a/openvpn/start.sh +++ b/openvpn/start.sh @@ -56,9 +56,9 @@ if [[ $VPN_ENABLED == "yes" ]]; then if [[ ! -z "${auth_cred_exist}" ]]; then # Get line number of auth-user-pass LINE_NUM=$(grep -Fn -m 1 'auth-user-pass' ${VPN_CONFIG} | cut -d: -f 1) - sed -i "${LINE_NUM}s/^/auth-user-pass credentials.conf\n/" ${VPN_CONFIG} + sed -i "${LINE_NUM}s/.*/auth-user-pass credentials.conf\n/" ${VPN_CONFIG} else - sed -i "1s/^/auth-user-pass credentials.conf\n/" ${VPN_CONFIG} + sed -i "1s/.*/auth-user-pass credentials.conf\n/" ${VPN_CONFIG} fi fi