mirror of
https://github.com/YunoHost-Apps/adguardhome_ynh.git
synced 2024-09-03 18:06:23 +02:00
rename "update_config()" into more explicit "update_agh_config()"
This commit is contained in:
parent
b913775894
commit
aeab6379ab
4 changed files with 4 additions and 4 deletions
|
@ -76,7 +76,7 @@ process_ips(){
|
||||||
echo "$ips"
|
echo "$ips"
|
||||||
}
|
}
|
||||||
|
|
||||||
update_config(){
|
update_agh_config(){
|
||||||
# used to update the IP adresses in the AGHconfig file
|
# used to update the IP adresses in the AGHconfig file
|
||||||
|
|
||||||
python3 -c "import yaml
|
python3 -c "import yaml
|
||||||
|
|
|
@ -40,7 +40,7 @@ set__open_port_53() {
|
||||||
ipv6_addr=$(process_ips "$(ip -6 route get ::1.2.3.4 2> /dev/null | head -n1)")
|
ipv6_addr=$(process_ips "$(ip -6 route get ::1.2.3.4 2> /dev/null | head -n1)")
|
||||||
|
|
||||||
# update the IP adresses in the AGH config file
|
# update the IP adresses in the AGH config file
|
||||||
update_config
|
update_agh_config
|
||||||
|
|
||||||
# save the new setting
|
# save the new setting
|
||||||
ynh_app_setting_set "$app" --key=open_port_53 --value="$open_port_53"
|
ynh_app_setting_set "$app" --key=open_port_53 --value="$open_port_53"
|
||||||
|
|
|
@ -54,7 +54,7 @@ ipv4_addr=$(process_ips "$(ip -4 route get 1.2.3.4 2> /dev/null | head -n1 | hea
|
||||||
ipv6_addr=$(process_ips "$(ip -6 route get ::1.2.3.4 2> /dev/null | head -n1)")
|
ipv6_addr=$(process_ips "$(ip -6 route get ::1.2.3.4 2> /dev/null | head -n1)")
|
||||||
|
|
||||||
# update the IP adresses in the AGH config file
|
# update the IP adresses in the AGH config file
|
||||||
update_config
|
update_agh_config
|
||||||
|
|
||||||
|
|
||||||
# this will be treated as a security issue.
|
# this will be treated as a security issue.
|
||||||
|
|
|
@ -136,7 +136,7 @@ ipv4_addr=$(process_ips "$(ip -4 route get 1.2.3.4 2> /dev/null | head -n1 | hea
|
||||||
ipv6_addr=$(process_ips "$(ip -6 route get ::1.2.3.4 2> /dev/null | head -n1)")
|
ipv6_addr=$(process_ips "$(ip -6 route get ::1.2.3.4 2> /dev/null | head -n1)")
|
||||||
|
|
||||||
# update the IP adresses in the AGH config file
|
# update the IP adresses in the AGH config file
|
||||||
update_config
|
update_agh_config
|
||||||
|
|
||||||
chmod 600 "$install_dir/AdGuardHome.yaml"
|
chmod 600 "$install_dir/AdGuardHome.yaml"
|
||||||
chown -R "$app:$app" "$install_dir/AdGuardHome.yaml"
|
chown -R "$app:$app" "$install_dir/AdGuardHome.yaml"
|
||||||
|
|
Loading…
Add table
Reference in a new issue