Outils pour utilisateurs

Outils du site


linux:installation:noip_automatiser_l_update_dns
nano /etc/init.d/noip-update.sh
noip-update.sh
  1. #!/bin/sh
  2. #
  3. # Purpose :
  4. # This script updates the no-ip alias.
  5. # The specifications of the noip update
  6. # protocol can be found at :
  7. # http://www.no-ip.com/integrate/
  8. #
  9. # Author :
  10. # Raphael Jolivet
  11. #
  12. # Last update:
  13. # 14-05-2005
  14. # Misc params (Set it to what you need)
  15. LOGIN=XXXXXXXXXXXXX # NoIp login
  16. PASS=XXXXXXXXXXXX # NoIp pass
  17. HOST=XXXX1,XXXX2,XXXX3 # The sites to be updated
  18. LOGFILE=/var/logs/noip.txt # The log file
  19. # Log the date
  20. echo "" > $LOGFILE
  21. echo "Updating no-ip DNS entry" >> $LOGFILE
  22. echo "------------------------" >> $LOGFILE
  23. date >> $LOGFILE
  24. # Call No-ip Update system
  25. result=`curl -s "http://dynupdate.no-ip.com/dns?username=$LOGIN&password=$PASS&hostname=$HOST" 2>&1`
  26. # Log the result
  27. echo "Result from no-ip: $result" >> $LOGFILE
chmod +x /etc/init.d/noip-update.sh
crontab -e
03 */12 * * * /etc/init.d/noip-update.sh
linux/installation/noip_automatiser_l_update_dns.txt · Dernière modification : 2022/09/03 17:09 de tutospisto