Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
PKG-INFO
README
loopiadnssync.py
setup.py

README

---------------------------------------------
Install

$python setup.py install
or 
$sudo python setup.py install

---------------------------------------------
Example implementation and usage

#!/usr/bin/env python
from loopiadnssync import LoopiaDnsSync

#list of domains
domains = ['yourdomain1','yourdomain2']

#list of top domains
topDomains = ['.com', '.org']

#list of sub domains
subDomains = ['', 'www.']

username = 'user'
password = 'password'

#prepare
loopiadnsSync = LoopiaDnsSync(username, password)	

#add domains			
for domain in domains:
	for topDomain in topDomains:
		for subDomain in subDomains:
			loopiadnsSync.addDomain(subDomain + domain + topDomain);
#finaly sync
loopiadnsSync.syncDomains()

cronjob 
$/usr/local/bin/loopiadns.py >> /var/log/loopiadnssync.log  2>&1 

---------------------------------------------
Output

$python loopiadns.py 
loopiadnssync: Sat, 16 Apr 2011 19:12:12
yourdomain1.com, 127.0.0.1, nochg
www.yourdomain1.com, 127.0.0.1, nochg
yourdomain2.com, 127.0.0.1, nochg
www.yourdomain2.com, 127.0.0.1, nochg