mirror of
https://github.com/YunoHost-Apps/adguardhome_ynh.git
synced 2024-09-03 18:06:23 +02:00
properly fix unbound vars
This commit is contained in:
parent
fced44bdb1
commit
d5b68fded1
1 changed files with 4 additions and 6 deletions
|
@ -29,12 +29,11 @@ ynh_systemd_action --service_name="$app" --action="stop"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
|
|
||||||
ynh_app_setting_get --app="$app" --key=dns_over_https
|
if [ -n "${dns_over_https:-}" ] && [ "${dns_over_https:-}" == "1" ]; then
|
||||||
if [ -n "$dns_over_https" ] && [ "$dns_over_https" == "1" ]; then
|
|
||||||
dns_over_https="true"
|
dns_over_https="true"
|
||||||
ynh_app_setting_set --app="$app" --key=dns_over_https --value=$dns_over_https
|
ynh_app_setting_set --app="$app" --key=dns_over_https --value=$dns_over_https
|
||||||
# no need to open the ports, as they were opened at the 'Provisioning ports' step
|
# no need to open the ports, as they were opened at the 'Provisioning ports' step
|
||||||
elif [ -z "$dns_over_https" ] || [ "$dns_over_https" == "0" ]; then
|
elif [ -z "${dns_over_https:-}" ] || [ "${dns_over_https:-}" == "0" ]; then
|
||||||
dns_over_https="false"
|
dns_over_https="false"
|
||||||
ynh_app_setting_set --app="$app" --key=dns_over_https --value=$dns_over_https
|
ynh_app_setting_set --app="$app" --key=dns_over_https --value=$dns_over_https
|
||||||
# if dns_over_https is false, we need to close ports,
|
# if dns_over_https is false, we need to close ports,
|
||||||
|
@ -44,12 +43,11 @@ elif [ -z "$dns_over_https" ] || [ "$dns_over_https" == "0" ]; then
|
||||||
ynh_exec_warn_less yunohost firewall reload
|
ynh_exec_warn_less yunohost firewall reload
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ynh_app_setting_get --app="$app" --key=open_port_53
|
if [ -n "${open_port_53:-}" ] && [ "${open_port_53:-}" == "1" ]; then
|
||||||
if [ -n "$open_port_53" ] && [ "$open_port_53" == "1" ]; then
|
|
||||||
open_port_53="true"
|
open_port_53="true"
|
||||||
ynh_app_setting_set --app="$app" --key=open_port_53 --value="$open_port_53"
|
ynh_app_setting_set --app="$app" --key=open_port_53 --value="$open_port_53"
|
||||||
# no need to open th port, as it were opened at the 'Provisioning ports' step
|
# no need to open th port, as it were opened at the 'Provisioning ports' step
|
||||||
elif [ -z "$open_port_53" ] || [ "$open_port_53" == "0" ]; then
|
elif [ -z "${open_port_53:-}" ] || [ "${open_port_53:-}" == "0" ]; then
|
||||||
open_port_53="false"
|
open_port_53="false"
|
||||||
ynh_app_setting_set --app="$app" --key=open_port_53 --value="$open_port_53"
|
ynh_app_setting_set --app="$app" --key=open_port_53 --value="$open_port_53"
|
||||||
# if open_port_53 is false, we need to close port,
|
# if open_port_53 is false, we need to close port,
|
||||||
|
|
Loading…
Add table
Reference in a new issue