1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pihole_ynh.git synced 2024-09-03 20:05:58 +02:00

fix upgrade/restore scripts

This commit is contained in:
Kay0u 2021-07-01 01:48:47 +02:00
parent 5efb292a9a
commit 1f04e5b138
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
4 changed files with 12 additions and 5 deletions

View file

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

View file

@ -119,7 +119,7 @@ else
ynh_setup_source --dest_dir="$final_path" --source_id=admin_dashboard_last ynh_setup_source --dest_dir="$final_path" --source_id=admin_dashboard_last
fi fi
chown -R $app:www-data "$final_path" chown $app:www-data "$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
@ -220,7 +220,10 @@ fi
# Instead of downloading a binary file, we're going to compile it # Instead of downloading a binary file, we're going to compile it
( cd "$FTL_temp_path" ( 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
ynh_exec_warn_less make install ) ynh_exec_warn_less make install )
ynh_secure_remove --file="$FTL_temp_path" ynh_secure_remove --file="$FTL_temp_path"

View file

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

View file

@ -163,7 +163,7 @@ then
fi fi
fi fi
chown -R $app:www-data "$final_path" chown $app:www-data "$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
@ -260,7 +260,10 @@ then
# Instead of downloading a binary file, we're going to compile it # Instead of downloading a binary file, we're going to compile it
( cd "$FTL_temp_path" ( 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
ynh_exec_warn_less make install ) ynh_exec_warn_less make install )
ynh_secure_remove --file="$FTL_temp_path" ynh_secure_remove --file="$FTL_temp_path"