Argument parsing for synamic DNS where no provider given
This commit is contained in:
parent
5480616315
commit
919354059c
|
@ -277,6 +277,9 @@ function parse_args {
|
||||||
read_config_param 'MY_USERNAME'
|
read_config_param 'MY_USERNAME'
|
||||||
read_config_param 'SYSTEM_TYPE'
|
read_config_param 'SYSTEM_TYPE'
|
||||||
read_config_param 'ONION_ONLY'
|
read_config_param 'ONION_ONLY'
|
||||||
|
read_config_param 'DDNS_PROVIDER'
|
||||||
|
read_config_param 'DDNS_USERNAME'
|
||||||
|
read_config_param 'DDNS_PASSWORD'
|
||||||
|
|
||||||
if [ ! -d /home/$MY_USERNAME ]; then
|
if [ ! -d /home/$MY_USERNAME ]; then
|
||||||
echo $"There is no user '$MY_USERNAME' on the system. Use 'adduser $MY_USERNAME' to create the user."
|
echo $"There is no user '$MY_USERNAME' on the system. Use 'adduser $MY_USERNAME' to create the user."
|
||||||
|
@ -295,14 +298,16 @@ function parse_args {
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
if [[ $SYSTEM_TYPE != "mesh"* ]]; then
|
if [[ $SYSTEM_TYPE != "mesh"* ]]; then
|
||||||
if [[ $ONION_ONLY == "no" ]]; then
|
if [[ $DDNS_PROVIDER != 'none' ]]; then
|
||||||
if [ ! $DDNS_USERNAME ]; then
|
if [[ $ONION_ONLY == "no" ]]; then
|
||||||
echo $'Please provide the username for your dynamic DNS provider with the --ddnsuser option'
|
if [ ! $DDNS_USERNAME ]; then
|
||||||
exit 7823
|
echo $'Please provide the username for your dynamic DNS provider with the --ddnsuser option'
|
||||||
fi
|
exit 7823
|
||||||
if [ ! $DDNS_PASSWORD ]; then
|
fi
|
||||||
echo $'Please provide the password for your dynamic DNS provider with the --ddnspass option'
|
if [ ! $DDNS_PASSWORD ]; then
|
||||||
exit 6382
|
echo $'Please provide the password for your dynamic DNS provider with the --ddnspass option'
|
||||||
|
exit 6382
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue