Browse Source

Merge pull request #115 from YunoHost-Apps/testing

Testing
HgO 1 year ago
parent
commit
0c413d1896
9 changed files with 14 additions and 5 deletions
  1. 1 1
      README.md
  2. 1 1
      README_fr.md
  3. 2 2
      conf/openvpn_client.conf.tpl
  4. 3 0
      conf/openvpn_run-parts.sh
  5. 1 1
      manifest.json
  6. 1 0
      scripts/_common.sh
  7. 1 0
      scripts/backup
  8. 3 0
      scripts/remove
  9. 1 0
      scripts/restore

+ 1 - 1
README.md

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

+ 1 - 1
README_fr.md

@@ -25,7 +25,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
 
 
 
-**Version incluse :** 2.1.1~ynh1
+**Version incluse :** 2.1.2~ynh1
 
 ## Captures d’écran
 

+ 2 - 2
conf/openvpn_client.conf.tpl

@@ -42,5 +42,5 @@ route-ipv6 2000::/3
 redirect-gateway def1 bypass-dhcp
 
 script-security 2
-route-up "/usr/bin/run-parts /etc/openvpn/scripts/route-up.d"
-down "/usr/bin/run-parts /etc/openvpn/scripts/route-down.d"
+route-up "/etc/openvpn/scripts/run-parts.sh route-up"
+down "/etc/openvpn/scripts/run-parts.sh route-down"

+ 3 - 0
conf/openvpn_run-parts.sh

@@ -0,0 +1,3 @@
+#!/bin/bash
+
+run-parts -v /etc/openvpn/scripts/$1.d/

+ 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.1.1~ynh1",
+  "version": "2.1.2~ynh1",
   "url": "https://labriqueinter.net",
   "license": "AGPL-3.0",
   "maintainer": {

+ 1 - 0
scripts/_common.sh

@@ -39,6 +39,7 @@ function vpnclient_deploy_files_and_services()
   mkdir -pm 0775 /etc/openvpn/scripts
   mkdir -pm 0775 /etc/openvpn/scripts/route-up.d
   mkdir -pm 0775 /etc/openvpn/scripts/route-down.d
+  install -b -o root -g root -m 0755 ../conf/openvpn_run-parts.sh /etc/openvpn/scripts/run-parts.sh
 
   #=================================================
 

+ 1 - 0
scripts/backup

@@ -36,6 +36,7 @@ ynh_backup "/etc/yunohost/hooks.d/90-vpnclient.tpl"
 
 ynh_backup "/etc/openvpn/client.conf.tpl"
 ynh_backup "/etc/openvpn/keys/"
+ynh_backup "/etc/openvpn/scripts/run-parts.sh"
 
 ynh_backup "/usr/local/bin/$service_name"
 ynh_backup "/usr/local/bin/$service_checker_name.sh"

+ 3 - 0
scripts/remove

@@ -64,6 +64,9 @@ ynh_print_info "Removing openvpn configuration"
 ynh_secure_remove /etc/openvpn/client.conf
 ynh_secure_remove /etc/openvpn/client.conf.tpl
 
+# Remove openvpn script
+ynh_secure_remove /etc/openvpn/scripts/run-parts.sh
+
 # Remove YunoHost hook
 ynh_secure_remove /etc/yunohost/hooks.d/90-vpnclient.tpl
 

+ 1 - 0
scripts/restore

@@ -34,6 +34,7 @@ ynh_restore_file "/etc/yunohost/hooks.d/90-vpnclient.tpl"
 
 ynh_restore_file "/etc/openvpn/client.conf.tpl"
 ynh_restore_file "/etc/openvpn/keys/"
+ynh_restore_file "/etc/openvpn/scripts/run-parts.sh"
 
 ynh_restore_file "/usr/local/bin/$service_name"
 ynh_restore_file "/usr/local/bin/$service_checker_name.sh"