DDNS login details
This commit is contained in:
parent
1869a09ebf
commit
a68443cc8c
|
@ -1066,7 +1066,8 @@ function interactive_configuration {
|
||||||
esac
|
esac
|
||||||
save_configuration_file
|
save_configuration_file
|
||||||
|
|
||||||
while [ ! $DDNS_USERNAME ]
|
valid_ddns_username=
|
||||||
|
while [ ! $valid_ddns_username ]
|
||||||
do
|
do
|
||||||
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
|
||||||
|
@ -1074,14 +1075,23 @@ function interactive_configuration {
|
||||||
--inputbox $"Dynamic DNS provider username" 10 30 "$(grep 'DDNS_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
|
--inputbox $"Dynamic DNS provider username" 10 30 "$(grep 'DDNS_USERNAME' temp.cfg | awk -F '=' '{print $2}')" 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
0) DDNS_USERNAME=$(cat $data);;
|
0) possible_username=$(cat $data)
|
||||||
|
if [ "$possible_username" ]; then
|
||||||
|
if [ ${#possible_username} -gt 1 ]; then
|
||||||
|
valid_ddns_username=$(cat $data)
|
||||||
|
DDNS_USERNAME=$valid_ddns_username
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
1) exit 1;;
|
1) exit 1;;
|
||||||
255) exit 1;;
|
255) exit 1;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
save_configuration_file
|
save_configuration_file
|
||||||
|
|
||||||
while [ ! $DDNS_PASSWORD ]
|
valid_ddns_password=
|
||||||
|
while [ ! $valid_ddns_password ]
|
||||||
do
|
do
|
||||||
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
|
||||||
|
@ -1091,7 +1101,15 @@ function interactive_configuration {
|
||||||
--passwordbox $"Dynamic DNS provider password" 10 30 "$(grep 'DDNS_PASSWORD' temp.cfg | awk -F '=' '{print $2}')" 2> $data
|
--passwordbox $"Dynamic DNS provider password" 10 30 "$(grep 'DDNS_PASSWORD' temp.cfg | awk -F '=' '{print $2}')" 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
0) DDNS_PASSWORD=$(cat $data);;
|
0) possible_password=$(cat $data)
|
||||||
|
if [ "$possible_password" ]; then
|
||||||
|
if [ ${#possible_password} -gt 1 ]; then
|
||||||
|
valid_ddns_password=$(cat $data)
|
||||||
|
DDNS_PASSWORD=$valid_ddns_password
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
1) exit 1;;
|
1) exit 1;;
|
||||||
255) exit 1;;
|
255) exit 1;;
|
||||||
esac
|
esac
|
||||||
|
@ -1118,6 +1136,7 @@ function interactive_configuration {
|
||||||
if [ ${#possible_name} -gt 1 ]; then
|
if [ ${#possible_name} -gt 1 ]; then
|
||||||
valid_name="$possible_name"
|
valid_name="$possible_name"
|
||||||
MY_NAME="$possible_name"
|
MY_NAME="$possible_name"
|
||||||
|
break;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue