New Paste

 

Administrate




Pastebin on unaen.org

PasteID: 3gz
Pasted by copec, 2021-05-24 22:18:11 GMT
Expires Never
Paste size 929 b
Tools Raw   Download
 
  1. (defparameter *disable-dns-plesk-xml-packet*  
  2.   "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>  
  3. <packet>  
  4.   <dns>  
  5.     <disable>  
  6.       <filter>  
  7.         <site-id>~a</site-id>  
  8.       </filter>  
  9.     </disable>  
  10.   </dns>  
  11. </packet>")  
  12.   
  13. (defun disable-dns-plesk-xml-packet (site-id)  
  14.   (format t *disable-dns-plesk-xml-packet* site-id))  
  15.   
  16. (defun disable-dns-plesk (server-name servers-config domain)  
  17.   (let ((server-config (gethash server-name servers-config)))  
  18.     (when server-config  
  19.       (with-accessors ((ip ip) (api-key api-key) (site-ids site-ids) (site-alias-ids site-alias-ids)) server-config  
  20. 	  (drakma:http-request (uri->string *plesk-xml-uri-defaults* :host ip)  
  21. 			       :method :post  
  22. 			       :additional-headers (api-key->header api-key)  
  23. 			       :content (disable-dns-plesk-xml-packet (or (gethash domain site-ids)  
  24. 									  (gethash domain site-alias-ids)))  
  25. 			       :content-type "text/xml")))))  
  26.  
 
 
 
 
Written by Xan Manning, 2010.