|
@@ -198,6 +198,13 @@ function convert_ovpn_file()
|
|
|
sed -i 's@^\s*key\s.*$@key /etc/openvpn/keys/user.key@g' ${config_file}
|
|
|
sed -i 's@^\s*tls-auth\s.*$@tls-auth /etc/openvpn/keys/user_ta.key 1@g' ${config_file}
|
|
|
|
|
|
+ script_security="script-security 2"
|
|
|
+ if grep -q '^\s*script-security\s.*$' ${config_file}; then
|
|
|
+ sed -i "s@^\s*script-security\s.*\$@$script_security@g" ${config_file}
|
|
|
+ else
|
|
|
+ echo "$script_security" >> ${config_file}
|
|
|
+ fi
|
|
|
+
|
|
|
route_up='route-up "/etc/openvpn/scripts/run-parts.sh route-up"'
|
|
|
if grep -q '^\s*route-up\s.*$' ${config_file}; then
|
|
|
sed -i "s@^\s*route-up\s.*\$@$route_up@g" ${config_file}
|