Skip to content
Snippets Groups Projects
Commit a68443cc authored by Bob Mottram's avatar Bob Mottram
Browse files

DDNS login details

parent 1869a09e
No related branches found
No related tags found
No related merge requests found
......@@ -1066,7 +1066,8 @@ function interactive_configuration {
esac
save_configuration_file
while [ ! $DDNS_USERNAME ]
valid_ddns_username=
while [ ! $valid_ddns_username ]
do
data=$(tempfile 2>/dev/null)
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
sel=$?
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;;
255) exit 1;;
esac
done
save_configuration_file
while [ ! $DDNS_PASSWORD ]
valid_ddns_password=
while [ ! $valid_ddns_password ]
do
data=$(tempfile 2>/dev/null)
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
sel=$?
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;;
255) exit 1;;
esac
......@@ -1118,6 +1136,7 @@ function interactive_configuration {
if [ ${#possible_name} -gt 1 ]; then
valid_name="$possible_name"
MY_NAME="$possible_name"
break;
fi
fi
;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment