# cat makekeys.py
#!/usr/bin/python3.4
import subprocess
import sys
import string
import os.path
import datetime
import shlex
from time import gmtime, strftime
from subprocess import Popen, PIPE, STDOUT
pretime = strftime("%Y%m%d%H", gmtime())
time = datetime.datetime.strptime(pretime,'%Y%m%d%H')
Yes, the program deletes the same files it produces. It looks to see if old
stuff is there and if it exist, it deletes the files and creates and entirely
new DNS zone with keys and then it is supposed to sign it.
The last step is where it is still failing but your code helped me to figure
out wh
Time adjustment error:
# python3.4 timefix.py
2015022105
2015-02-21 05:00:00
Traceback (most recent call last):
File "timefix.py", line 15, in
ndate = datetime.datetime.strptime(timeadd, '%Y%m%d%H')
TypeError: must be str, not datetime.datetime
# cat timefix.py
#!/usr/bin/python3.4
impor
fixed with
now = datetime.datetime.now()
later = now + datetime.timedelta(days=2*365)
striplater = later.strftime('%Y%m%d%H')
# python3.4 makekeys.py
Enter the domain to configure keys for? test1234.com
Generating key
pair..