Skip to content
Snippets Groups Projects
Commit 44af9a7b authored by Hayder Hassan's avatar Hayder Hassan
Browse files

Fix client status for registered IP

parent 9f2f4dab
No related branches found
No related tags found
1 merge request!9Fix client status for registered IP
Pipeline #209374 passed
......@@ -404,6 +404,8 @@ while : ; do
else
write_log 3 "IP update not accepted by DDNS Provider"
fi
elif [ "$CURRENT_IP" = "$REGISTERED_IP" ]; then
write_log 6 "No update needed - L: '$CURRENT_IP' == R: '$REGISTERED_IP'"
fi
# now we wait for check interval before testing if update was recognized
......
......@@ -144,13 +144,13 @@ get_client_status() {
if [ -f "${log_file}" ]; then
state="Connecting"
while read -r line; do
if [[ "${line}" =~ "Update successful" ]]; then
if [[ "${line}" =~ "Update successful" ]] || [[ "${line}" =~ "No update needed" ]]; then
state="Updated"
elif [[ "${line}" =~ "ERROR" ]] && [[ "${line}" =~ "Please check your configuration" ]]; then
state="Error_Misconfigured"
elif [[ "${line}" =~ "Registered IP" ]]; then
state="Connecting"
elif [[ "${line}" =~ "failed" ]]; then
elif [[ "${line}" =~ "ERROR" ]] || [[ "${line}" =~ "failed" ]]; then
state="Error"
fi
done < "${log_file}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment