fbpx

crear cron para ctualizar sitelutions

guía de crontab
como usuario hacer:

crontab -e

se abre el nano editor…
agergar la siguiente linea:

*/10 * * * * /home/gonzo/Scripts/sitelutions_dns_update.sh

el script llamado es el siguiente:

#!/bin/sh
#
# sitelutions_dns_update.sh
#
# This script updates Dynamic DNS Records on Sitelutions.com’s
# DNS servers. You must have wget installed for this to work.
#
# Author: Sitelutions (www.sitelutions.com)
# Last Modified: 10-February-2003
#
# This script is released as public domain in hope that it will
# be useful to others using Sitelutions. It is provided
# as-is with no warranty implied. Sending passwords as a part
# of an HTTP request is inherently insecure. Because of this, we
# recommend using HTTPS. We take no responsibilty
# if your password is discovered by use of this script.
#

# This is the e-mail address that you use to login
SLUSER=xxxxx

# This is your password
SLPASS=xxxxxx

# This is a string containing record ID(s) of your Sitelutions A record(s) that y$
# wish to updare. To obtain this ID, go into the URL & DNS Control Center, click
# [Advanced Config] on the appropriate host name, and click the [Dynamic DNS] link
# next to the A record. If you do not yet have an A record, create one!
# Multiple record IDs can be provided using a comma to separate them.
# If you have multiple records, use something like SLID=99234,423445,234355
SLID=xxxxx,xxxxx

# Obtain current ip address
IPADDR=`ifconfig eth0 | grep inet | awk ‘{print $2}’ | awk -F : ‘{print $2}’`

if wget -q -O /proc/self/fd/1 http://www.sitelutions.com/dnsup?user=$SLUSER&pass$
logger -t Sitelutions.com -s “DNS Record Updated Successfully”
else
logger -t Sitelutions.com -s “Problem updating DNS record.”
fi

# David Harris’s script for dynodns.net was used as an example
# in writing this script.

Don’t Stop Here

More To Explore