Browse Source

Improved sed safety

pull/1601/head
Marvin Lehmann 8 years ago
parent
commit
839b6b4e3e
  1. 2
      lgsm/functions/install_gslt.sh

2
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

Loading…
Cancel
Save