Browse Source

[fix] escape regex before applying sed

pitchum 3 years ago
parent
commit
0dec684c6e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scripts/config

+ 1 - 1
scripts/config

@@ -248,7 +248,7 @@ ynh_app_config_validate() {
         jq --raw-output '.openvpn_rm[]' "${config_file}" | while read -r rm_regex
         do
             if [ ! -z "${rm_regex}" ] ; then
-                sed -i "/$rm_regex/d" $tmp_dir/client.conf.tpl
+		sed -i "/${rm_regex/\//\\\/}/d" $tmp_dir/client.conf.tpl
             fi
         done