However these will not be executed unless script-security 2 is also added/uncommented.
if grep -Fxq "#script-security 2" input.conf
then
sed -i "/#script-security 2=/c\script-security 2" $config_file_modified"
else
echo "script-security 2" >> "$config_file_modified"
fi
It will cause an error when you try to start the VPN and the docker container will fail to stay up.
Edit:
Doesn't look like a check like this is required, because #script-security 2 already existed in my config, just needed uncommenting.
Your modified script changes these two lines
However these will not be executed unless
script-security 2
is also added/uncommented.It will cause an error when you try to start the VPN and the docker container will fail to stay up.
Edit:
Doesn't look like a check like this is required, because
#script-security 2
already existed in my config, just needed uncommenting.Did this exist in your config?