Procházet zdrojové kódy

fix upgrade/restore scripts

Kay0u před 4 roky
rodič
revize
1f04e5b138
4 změnil soubory, kde provedl 12 přidání a 5 odebrání
  1. 1 1
      scripts/actions/reset_default_app
  2. 5 2
      scripts/install
  3. 1 0
      scripts/restore
  4. 5 2
      scripts/upgrade

+ 1 - 1
scripts/actions/reset_default_app

@@ -71,7 +71,7 @@ else
     YNH_CWD=$PWD ynh_setup_source --dest_dir="$final_path" --source_id=admin_dashboard_last
 fi
 
-chown -R $app:www-data "$final_path"
+chown $app:www-data "$final_path"
 
 )
 

+ 5 - 2
scripts/install

@@ -119,7 +119,7 @@ else
     ynh_setup_source --dest_dir="$final_path" --source_id=admin_dashboard_last
 fi
 
-chown -R $app:www-data "$final_path"
+chown $app:www-data "$final_path"
 
 #=================================================
 # NGINX CONFIGURATION
@@ -220,7 +220,10 @@ fi
 
 # Instead of downloading a binary file, we're going to compile it
 ( cd "$FTL_temp_path"
-ynh_exec_warn_less cmake .
+if [ "$pihole_version" == "Last available" ]
+then
+    ynh_exec_warn_less cmake .
+fi
 ynh_exec_warn_less make
 ynh_exec_warn_less make install )
 ynh_secure_remove --file="$FTL_temp_path"

+ 1 - 0
scripts/restore

@@ -176,6 +176,7 @@ then
     # https://github.com/pi-hole/FTL/tree/master/dnsmasq
     ln -s /usr/bin/pihole-FTL /usr/sbin/dnsmasq
 
+    pihole_local_repo="/etc/.pihole"
     cp -a $pihole_local_repo/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL
     chmod +x /etc/init.d/pihole-FTL
     ynh_exec_warn_less systemctl enable pihole-FTL

+ 5 - 2
scripts/upgrade

@@ -163,7 +163,7 @@ then
     fi
 fi
 
-chown -R $app:www-data "$final_path"
+chown $app:www-data "$final_path"
 
 #=================================================
 # NGINX CONFIGURATION
@@ -260,7 +260,10 @@ then
 
     # Instead of downloading a binary file, we're going to compile it
     ( cd "$FTL_temp_path"
-    ynh_exec_warn_less cmake .
+    if [ "$pihole_version" == "Last available" ]
+    then
+        ynh_exec_warn_less cmake .
+    fi
     ynh_exec_warn_less make
     ynh_exec_warn_less make install )
     ynh_secure_remove --file="$FTL_temp_path"