Browse Source

Merge pull request #90 from YunoHost-Apps/testing

Testing
Alexandre Aubin 3 years ago
parent
commit
2407fa6482
5 changed files with 9 additions and 8 deletions
  1. 1 1
      README.md
  2. 1 1
      README_fr.md
  3. 1 1
      conf/ynh-hotspot
  4. 1 1
      manifest.json
  5. 5 4
      scripts/upgrade

+ 1 - 1
README.md

@@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
 * Combine with the [VPN Client app](https://github.com/labriqueinternet/vpnclient_ynh) to obtain a VPN-protected WiFi
 
 
-**Shipped version:** 2.0~ynh1
+**Shipped version:** 2.0~ynh3
 
 
 

+ 1 - 1
README_fr.md

@@ -15,7 +15,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
 * À combiner avec l'[app VPN Client](https://github.com/labriqueinternet/vpnclient_ynh) pour obtenir un accès internet aumatiquement protégé par votre VPN
 
 
-**Version incluse :** 2.0~ynh1
+**Version incluse :** 2.0~ynh3
 
 
 

+ 1 - 1
conf/ynh-hotspot

@@ -327,7 +327,7 @@ if [ "$1" != restart ]; then
   done
 
   old_internet_device=$(ynh_setting_get hotspot internet_device)
-  new_internet_device=$(ip route | awk '/default via/ { print $NF; }')
+  new_internet_device=$(ip route get 1.2.3.4 | awk '{ print $5; }')
 
   # Switch the NAT interface if there is a VPN
   ip link show dev tun0 &> /dev/null

+ 1 - 1
manifest.json

@@ -6,7 +6,7 @@
         "en": "Create and manager wifi networks, share Internet access and use Yunohost apps accross wifi",
         "fr": "Créer et configurer des réseaux wifi, partager l'accès a Internet et utiliser les applications Yunohost via wifi"
     },
-    "version": "2.0~ynh1",
+    "version": "2.0~ynh3",
     "url": "https://github.com/labriqueinternet/hotspot_ynh",
     "license": "AGPL-3.0",
     "maintainer": {

+ 5 - 4
scripts/upgrade

@@ -58,6 +58,7 @@ if [ -d /var/www/wifiadmin/ ]; then
     ynh_secure_remove /var/www/wifiadmin/
 fi
 
+
 if [ $firmware_nonfree = "yes" ]; then
 	firmware_nonfree=1
 	ynh_app_setting_set --app=$app --key=firmware_nonfree --value=$firmware_nonfree
@@ -84,10 +85,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