Missing function

This commit is contained in:
Bob Mottram 2018-03-18 10:44:47 +00:00
parent f178603ba1
commit f78c4345a9
2 changed files with 18 additions and 18 deletions

View File

@ -167,24 +167,6 @@ function any_key_verify {
rm -f "$data" rm -f "$data"
} }
function get_app_icann_address {
app_name="$1"
if grep -q "${app_name} domain" "$COMPLETION_FILE"; then
grep "${app_name} domain" "${COMPLETION_FILE}" | head -n 1 | awk -F ':' '{print $2}'
return
else
app_name_upper="$(echo "$app_name" | tr '[:lower:]' '[:upper:]')_DOMAIN_NAME"
if [ "$app_name_upper" ]; then
param_value=$(grep "${app_name_upper}=" "$CONFIGURATION_FILE" | head -n 1 | awk -F '=' '{print $2}')
if [ "${param_value}" ]; then
echo "${param_value}"
return
fi
fi
fi
echo "${DEFAULT_DOMAIN_NAME}"
}
function reset_password_tries { function reset_password_tries {
passwords_select_user passwords_select_user
if [ ! "$SELECTED_USERNAME" ]; then if [ ! "$SELECTED_USERNAME" ]; then

View File

@ -47,6 +47,24 @@ ROUTER_IP_ADDRESS="192.168.1.254"
MESH_INSTALL_DIR=/var/lib MESH_INSTALL_DIR=/var/lib
function get_app_icann_address {
app_name="$1"
if grep -q "${app_name} domain" "$COMPLETION_FILE"; then
grep "${app_name} domain" "${COMPLETION_FILE}" | head -n 1 | awk -F ':' '{print $2}'
return
else
app_name_upper="$(echo "$app_name" | tr '[:lower:]' '[:upper:]')_DOMAIN_NAME"
if [ "$app_name_upper" ]; then
param_value=$(grep "${app_name_upper}=" "$CONFIGURATION_FILE" | head -n 1 | awk -F '=' '{print $2}')
if [ "${param_value}" ]; then
echo "${param_value}"
return
fi
fi
fi
echo "${DEFAULT_DOMAIN_NAME}"
}
function install_static_network { function install_static_network {
if [[ $(is_completed "${FUNCNAME[0]}") == "1" ]]; then if [[ $(is_completed "${FUNCNAME[0]}") == "1" ]]; then
return return