def restart(): process_name = "opentxs-notary" pyopentxs.killall(process_name) # danger, also kill any goataries, # since they occupy the same port pyopentxs.killall("notary") os.system("%s > %s 2>&1 &" % (process_name, "opentxs-notary.log")) print("Started %s process" % process_name) pyopentxs.init()
def start_notary(contract_dir): '''Starts a new notary with the given contract_dir (created using create_contract tool)''' pyopentxs.killall("notary") # danger, also kill any opentxs-notary, # since they occupy the same port pyopentxs.killall("opentxs-notary") trans_key_arg = "--transport-key=%s/transportKey" % contract_dir sign_key_arg = "--signing-key=%s/signingKey" % contract_dir notary_id_arg = "--notary-id=`cat %s/notaryID`" % contract_dir os.system("notary %s %s %s > opentxs-goatary.log 2>&1 &" % (trans_key_arg, sign_key_arg, notary_id_arg))