My code to update my IPv4 on OVH.

#!/bin/bash
PATHL=PathWhereTheFileIs

DATE=$(/bin/date)
IFACE=eth0
HOST='mydomain.com'
LOGIN='MyOVHDynDNSLogin'
PASSWORD='MyOVHDynDNSPass'
#-l = log; -v = verbose
OPTIONS="-l -v"

# save the ip v4 from ping
IPPING=$(ping -q -c 1 $HOST)
[[ $IPPING =~ \([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\) ]]
IPP=${BASH_REMATCH[0]%)}
IPP=${IPP#(}

cd $PATHL

## Sauvegarde de l'adresse IP
# Si il n'y a pas d'ancienne IP, il va prendre
# l'IP que le ping du serveur lui renvoie

if [[ -f old.ip ]]
then 
    read OLDIP < old.ip
    if [ ! ${OLDIP} ]
    then
         OLDIP=$IPP
    fi
else 
    echo -n $IPP > old.ip
    OLDIP=$IPP
fi

## Recuperation de l'IP de la box, via checkip.dyndns.org
wget --timeout=180 --tries=2 http://checkip.dyndns.org
mapfile -n 1 a < index.html
[[ $a =~ [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ]]
IPC=${BASH_REMATCH[0]}


if [ "$IPC" != "$OLDIP" ]
then
    ## activer pycheck.py
    python ipcheck.py $OPTIONS -a $IPC $LOGIN $PASSWORD $HOST >> dynhost.log
    echo $DATE : changement IP de $OLDIP par $IPC >> dynhost.log
fi


rm -f index.html
rm -f ipcheck.html