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

Add admin for restore

This commit is contained in:
Maniack Crudelis 2017-12-22 18:49:19 +01:00
parent 78ab718b4b
commit 20879973c1
2 changed files with 18 additions and 0 deletions

View file

@ -343,6 +343,23 @@ ynh_exec_fully_quiet () {
eval $@ > /dev/null 2>&1
}
# Remove any logs for all the following commands.
#
# usage: ynh_print_OFF
# WARNING: You should be careful with this helper, and never forgot to use ynh_print_ON as soon as possible to restore the logging.
ynh_print_OFF () {
set +x
}
# Restore the logging after ynh_print_OFF
#
# usage: ynh_print_ON
ynh_print_ON () {
set -x
# Print an echo only for the log, to be able to know that ynh_print_ON has been called.
echo ynh_print_ON > /dev/null
}
#=================================================
# Install or update the main directory yunohost.multimedia

View file

@ -33,6 +33,7 @@ domain=$(ynh_app_setting_get $app domain)
path_url=$(ynh_app_setting_get $app path)
final_path=$(ynh_app_setting_get $app final_path)
enable_dhcp=$(ynh_app_setting_get $app enable_dhcp)
admin=$(ynh_app_setting_get $app admin)
#=================================================
# CHECK IF THE APP CAN BE RESTORED