From 839b6b4e3e601ad7cf44006e36c99f22952164f9 Mon Sep 17 00:00:00 2001 From: Marvin Lehmann Date: Thu, 31 Aug 2017 17:33:08 +0200 Subject: [PATCH] Improved sed safety --- lgsm/functions/install_gslt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/install_gslt.sh b/lgsm/functions/install_gslt.sh index bef4c154b..44ba390a3 100644 --- a/lgsm/functions/install_gslt.sh +++ b/lgsm/functions/install_gslt.sh @@ -33,7 +33,7 @@ if [ -z "${autoinstall}" ]; then if ! grep -q "^gslt=" "${configdirserver}/${servicename}.cfg" > /dev/null 2>&1; then echo -e "\ngslt=\"${token}\"" >> "${configdirserver}/${servicename}.cfg" else - sed -i -e "s/gslt=\".*\"/gslt=\"${token}\"/g" "${configdirserver}/${servicename}.cfg" + sed -i -e "s/gslt=\"[^\"]*\"/gslt=\"${token}\"/g" "${configdirserver}/${servicename}.cfg" fi fi fi