diff --git a/installer/check_modules.py b/installer/check_modules.py new file mode 100755 index 0000000..8b6b8fd --- /dev/null +++ b/installer/check_modules.py @@ -0,0 +1,12 @@ +#!/usr/bin/python +import sys +try: + import dns + has = 1 +except: + has = 0 + +if has == 1: + sys.exit(0) +else: + sys.exit(1) diff --git a/installer/dnspython-1.2.0.tar.gz b/installer/dnspython-1.2.0.tar.gz new file mode 100644 index 0000000..243295b Binary files /dev/null and b/installer/dnspython-1.2.0.tar.gz differ diff --git a/installer/install.sh b/installer/install.sh new file mode 100644 index 0000000..31651fa --- /dev/null +++ b/installer/install.sh @@ -0,0 +1,21 @@ +#!/bin/sh +DNSPYTHON_VER=1.2.0 + +# Do we have the dns modules?? +./check_dnsmod.py +if [ "$?" == "1" ]; then + DNSPYTHON=dnspython-$DNSPYTHON_VER + tar zxf $DNSPYTHON.tar.gz + cd $DNSPYTHON + python setup.py install + cd .. +fi + +# Copy the manpages +cp ../dnsupdate.1 /usr/share/man/man1 +gzip /usr/share/man/man1/dnsupdate.1 +cp ../dnsupdaterc.5 /usr/share/man/man5 +gzip /usr/share/man/man5/dnsupdaterc.5 + +cp ../dnsupdate.py /usr/bin/dnsupdate +chmod 755 /usr/bin/dnsupdate \ No newline at end of file