Browse Source

Merge pull request #87 from YunoHost-Apps/testing

2.0.2~ynh2
ljf (zamentur) 3 years ago
parent
commit
a05f335f38
6 changed files with 11 additions and 8 deletions
  1. 1 1
      README.md
  2. 1 1
      README_fr.md
  3. 3 0
      config_panel.toml
  4. 1 1
      manifest.json
  5. 1 1
      scripts/config
  6. 4 4
      scripts/upgrade

+ 1 - 1
README.md

@@ -24,7 +24,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
 
 
 
-**Shipped version:** 2.0.2~ynh1
+**Shipped version:** 2.0.2~ynh2
 
 
 

+ 1 - 1
README_fr.md

@@ -20,7 +20,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
 
 
 
-**Version incluse :** 2.0.2~ynh1
+**Version incluse :** 2.0.2~ynh2
 
 
 

+ 3 - 0
config_panel.toml

@@ -29,6 +29,7 @@ name = "Auto-configuration"
         accept = ".cube, .ovpn, .conf"
         help = ".cube file recommended, .ovpn file accepted"
         bind = "/etc/openvpn/client.conf"
+        redact = true
         
     [main.auth]
     name = "Authentication"
@@ -53,6 +54,7 @@ name = "Auto-configuration"
         help = "This file begins with -----BEGIN PRIVATE KEY-----"
         bind = "/etc/openvpn/keys/user.key"
         visible = 'config_file && match(config_file,"^\s*key\s") && ! match(config_file,"^\s*<key>")'
+        redact = true
         
         [main.auth.login_user]
         ask = "Username"
@@ -74,6 +76,7 @@ name = "Auto-configuration"
         help = "Some servers have an additional protection agains Deny of Service attack. If you have no tls-auth key in your ovpn, skip this question."
         bind = "/etc/openvpn/keys/user_ta.key"
         visible = 'config_file && match(config_file,"^\s*tls-auth\s") && ! match(config_file,"^\s*<tls-auth>")'
+        redact = true
         
 [advanced]
 name = "DNS & IPv6"

+ 1 - 1
manifest.json

@@ -6,7 +6,7 @@
     "en": "Tunnel the internet traffic through a VPN",
     "fr": "Fait passer le trafic internet à travers un VPN"
   },
-  "version": "2.0.2~ynh1",
+  "version": "2.0.2~ynh2",
   "url": "https://labriqueinter.net",
   "license": "AGPL-3.0",
   "maintainer": {

+ 1 - 1
scripts/config

@@ -245,7 +245,7 @@ ynh_app_config_validate() {
         tmp_dir=$(dirname "${config_file}")
         cp -f /etc/openvpn/client.conf.tpl $tmp_dir/client.conf.tpl
         # Remove some lines
-        for rm_regex in "$(jq --raw-output '.openvpn_rm[]' "${config_file}")"
+        for rm_regex in $(jq --raw-output '.openvpn_rm[]' "${config_file}")
         do
             if [ ! -z "${rm_regex}" ] ; then
                 sed -i "/$rm_regex/d" $tmp_dir/client.conf.tpl

+ 4 - 4
scripts/upgrade

@@ -40,10 +40,10 @@ if [ -f /etc/nginx/conf.d/*.d/$app.conf ]; then
 	ynh_secure_remove /etc/nginx/conf.d/*.d/$app.conf
     ynh_systemd_action --service_name=nginx --action=reload
 fi
-if [ -f /etc/php/*/fpm/pool.d/$app.conf ]; then
-	ynh_secure_remove /etc/php/*/fpm/pool.d/$app.conf
-    ynh_systemd_action --service_name=php$YNH_DEFAULT_PHP_VERSION-fpm --action=reload
-fi
+
+for php_path in $(ls /etc/php/*/fpm/pool.d/$app.conf 2> /dev/null); do
+	ynh_secure_remove $php_path
+done
 
 if [ -d /var/www/$app ]; then
 	ynh_secure_remove /var/www/$app