mirror of
https://github.com/curly60e/pyblock.git
synced 2026-08-15 12:50:38 +02:00
Improved code
Better satnode clone. $HOME folder changed to satellite folder inside pyblock.
This commit is contained in:
parent
dc4548f8a9
commit
6e36f40b4c
1 changed files with 7 additions and 15 deletions
22
clone.py
22
clone.py
|
|
@ -1,28 +1,20 @@
|
|||
#Developer: Curly60e
|
||||
#PyBLOCK its a clock of the Bitcoin blockchain.
|
||||
#Version: 0.3.0
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import time as t
|
||||
|
||||
|
||||
def gitclone():
|
||||
if os.path.isdir('$HOME/pyblock/satellite'):
|
||||
print("OK Pass")
|
||||
|
||||
else:
|
||||
url = "https://github.com/curly60e/satellite"
|
||||
os.system("git clone " + url)
|
||||
os.system("mkdir $HOME/pyblock/satellite/api/examples/.gnupg")
|
||||
os.system("cp -r $HOME/pyblock/satellite/api/examples $HOME/pyblock/")
|
||||
os.system("gpg --full-generate-key --homedir $HOME/pyblock/examples/.gnupg")
|
||||
url = "https://github.com/curly60e/satellite"
|
||||
os.system("git clone " + url)
|
||||
os.system("mkdir satellite/api/examples/.gnupg")
|
||||
#os.system("cp -r $HOME/pyblock/satellite/api/examples $HOME/pyblock/")
|
||||
os.system("gpg --full-generate-key --homedir satellite/api/examples/.gnupg")
|
||||
|
||||
def satnode():
|
||||
try:
|
||||
os.system("python3 $HOME/pyblock/examples/demo-rx.py &")
|
||||
os.system("python3 satellite/api/examples/demo-rx.py &")
|
||||
t.sleep(5)
|
||||
os.system("python3 $HOME/pyblock/examples/api_data_reader.py --demo --plaintext ")
|
||||
os.system("python3 satellite/api/examples/api_data_reader.py --demo --plaintext ")
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
os.system("ps -ef | grep demo-rx.py | grep -v grep | awk '{print $2}' | xargs kill -9")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue