mirror of
https://github.com/openoms/joininbox.git
synced 2026-08-14 12:43:13 +02:00
26 lines
No EOL
875 B
Python
26 lines
No EOL
875 B
Python
#!/home/joinmarket/joinmarket-clientserver/jmvenv/bin/python
|
|
|
|
import subprocess
|
|
import sys
|
|
import os
|
|
|
|
SCRIPT = sys.argv[1]
|
|
WALLET = sys.argv[2]
|
|
|
|
f = open('/home/joinmarket/.pw','r')
|
|
PW = f.read().strip()
|
|
f.close()
|
|
os.system('rm -f /home/joinmarket/.pw')
|
|
|
|
logfile = open('%s.log' %SCRIPT, 'w')
|
|
|
|
process = subprocess.Popen(['python', '/home/joinmarket/joinmarket-clientserver/scripts/%s.py' %SCRIPT,'%s.jmdat' %WALLET, '--wallet-password-stdin'],
|
|
stdin=subprocess.PIPE,
|
|
universal_newlines=True,
|
|
stderr=subprocess.STDOUT,
|
|
stdout=logfile)
|
|
process.stdin.write ("%s" %PW)
|
|
process.stdin.close()
|
|
|
|
process.wait()
|
|
logfile.close() |