v.0.0.6 User-agent

This commit is contained in:
alcapone1933
2022-11-12 11:13:46 +01:00
parent c7a5b39b2d
commit a7045709c8
6 changed files with 25 additions and 23 deletions

View File

@@ -30,14 +30,14 @@ else
# echo "$DATUM DOMAIN - Deine DOMAIN $DOMAIN_IPV64"
for DOMAIN in $(echo "${DOMAIN_IPV64}" | sed -e "s/,/ /g"); do echo "$DATUM DOMAIN - Deine DOMAIN $DOMAIN"; done
fi
if ! curl -sSL --fail https://ipv64.net/ > /dev/null; then
if ! curl -sSL --user-agent "${CURL_USER_AGENT}" --fail https://ipv64.net/ > /dev/null; then
echo "$DATUM FEHLER !!! - 404 Sie haben kein Netzwerk oder Internetzugang"
exit 0
fi
# IP=$(curl -4s https://ipv64.net/wieistmeineip.php | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | tail -n 1)
# CHECK=$(curl -4sSL "https://ipv64.net/update.php?key=${DOMAIN_KEY}&domain=${DOMAIN_IPV64}&ip=$IP" | grep -o "success")
IP=$(curl -4ssL https://ipv64.net/update.php?howismyip | jq -r 'to_entries[] | "\(.value)"')
CHECK=$(curl -4sSL "https://ipv64.net/update.php?key=${DOMAIN_KEY}&domain=${DOMAIN_IPV64}&ip=${IP}&output=min")
IP=$(curl -4ssL --user-agent "${CURL_USER_AGENT}" "https://ipv64.net/update.php?howismyip" | jq -r 'to_entries[] | "\(.value)"')
CHECK=$(curl -4sSL --user-agent "${CURL_USER_AGENT}" "https://ipv64.net/update.php?key=${DOMAIN_KEY}&domain=${DOMAIN_IPV64}&ip=${IP}&output=min")
# if [ "$CHECK" = "ok" ] ; then
if [[ "$CHECK" =~ (nochg|good|ok) ]] ; then
echo "$DATUM CHECK - Die Angaben sind richtig gesetzt: DOMAIN und DOMAIN KEY"