from binascii import hexlify
restart_stunnel_cmdline = ["/etc/init.d/S50stunnel","restart"]
secretstring = hexlify(os.urandom(256))
pskstring = ID+":"+secretstring
with open(pskpath, 'w') as f:
call(restart_stunnel_cmdline)
def ensurepsk(ID, pskpath):
if not os.path.exists(pskpath):