Option to select no dynamic dns provider

This commit is contained in:
Bob Mottram 2017-05-14 23:40:11 +01:00
parent afe945c377
commit c49b94f9ff
1 changed files with 61 additions and 52 deletions

View File

@ -253,7 +253,7 @@ function choose_dynamic_dns {
data=$(tempfile 2>/dev/null) data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15 trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Configuration" \ dialog --backtitle $"Freedombone Configuration" \
--radiolist $"Choose Dynamic DNS provider:" 15 40 14 \ --radiolist $"Choose Dynamic DNS provider:" 16 40 15 \
1 dyndns off \ 1 dyndns off \
2 freedns on \ 2 freedns on \
3 zoneedit off \ 3 zoneedit off \
@ -267,7 +267,8 @@ function choose_dynamic_dns {
11 dynsip off \ 11 dynsip off \
12 sitelutions off \ 12 sitelutions off \
13 dnsexit off \ 13 dnsexit off \
14 changeip off 2> $data 13 changeip off \
14 none off 2> $data
sel=$? sel=$?
case $sel in case $sel in
1) exit 1;; 1) exit 1;;
@ -288,11 +289,19 @@ function choose_dynamic_dns {
12) DDNS_PROVIDER="default@sitelutions.com";; 12) DDNS_PROVIDER="default@sitelutions.com";;
13) DDNS_PROVIDER="default@dnsexit.com";; 13) DDNS_PROVIDER="default@dnsexit.com";;
14) DDNS_PROVIDER="default@changeip.com";; 14) DDNS_PROVIDER="default@changeip.com";;
15) DDNS_PROVIDER="none";;
255) exit 1;; 255) exit 1;;
esac esac
save_configuration_values save_configuration_values
valid_ddns_username= valid_ddns_username=
valid_ddns_password=
if [[ "$DDNS_PROVIDER" == "none" ]]; then
if [ -f /etc/systemd/system/inadyn.service ]; then
systemctl stop inadyn
systemctl disable inadyn
fi
else
while [ ! $valid_ddns_username ] while [ ! $valid_ddns_username ]
do do
data=$(tempfile 2>/dev/null) data=$(tempfile 2>/dev/null)
@ -316,7 +325,6 @@ function choose_dynamic_dns {
done done
save_configuration_values save_configuration_values
valid_ddns_password=
while [ ! $valid_ddns_password ] while [ ! $valid_ddns_password ]
do do
data=$(tempfile 2>/dev/null) data=$(tempfile 2>/dev/null)
@ -346,6 +354,7 @@ function choose_dynamic_dns {
done done
save_configuration_values save_configuration_values
fi fi
fi
} }
function choose_debian_repo { function choose_debian_repo {