Change default config file location: /var/lib/named -> /var/lib/bind
[dyn-nsupdate.git] / server-scripts / update
index 3b3ab5308ee35cf208eb6b27df60d2feb277d0a2..c45df300b148fb0c40c4428a7c051d59c73478c2 100755 (executable)
@@ -43,14 +43,14 @@ domain = form["domain"].value
 password = form["password"].value
 
 # run update program
-p = subprocess.Popen(["/var/lib/named/dyn-nsupdate", domain, password, ip], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+p = subprocess.Popen(["/var/lib/bind/dyn-nsupdate", domain, password, ip], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 (stdout, stderr) = p.communicate()
 
 # check what it did
 if p.returncode or stderr or stdout:
-       # error :/
-       print "There was an error while updating the DNS: Return code %d" % p.returncode
-       if stdout: print stdout
-       if stderr: print stderr
+    # error :/
+    print "There was an error while updating the DNS: Return code %d" % p.returncode
+    if stdout: print stdout
+    if stderr: print stderr
 else:
-       print "good",ip
+    print "good",ip