diff --git a/rootfs/standard/usr/bin/gen_seed.py b/rootfs/standard/usr/bin/gen_seed.py index eaa4475e..868dd836 100755 --- a/rootfs/standard/usr/bin/gen_seed.py +++ b/rootfs/standard/usr/bin/gen_seed.py @@ -1,5 +1,5 @@ #!/usr/local/bin/python3 -from lnd_grpc import lnd_grpc +import base64, codecs, json, requests import os def format_seed_numbered(seed): @@ -19,16 +19,11 @@ def format_seed_raw(seed): # This is the main entry point for the program if __name__ == "__main__": - - network="mainnet" - if os.path.isfile("/mnt/hdd/mynode/settings/.testnet_enabled"): - network="testnet" + REST_GEN_SEED_URL="https://localhost:10080/v1/genseed" + REST_CERT_PATH="/home/bitcoin/.lnd/tls.cert" # Generate the seed - rpc = lnd_grpc.Client(lnd_dir="/home/bitcoin/.lnd/", - macaroon_path="/home/bitcoin/.lnd/data/chain/bitcoin/{}/admin.macaroon".format(network)) - - # Get seed and print - data = rpc.gen_seed() - formatted_seed = format_seed_raw(data.cipher_seed_mnemonic) + r = requests.get(REST_GEN_SEED_URL, verify=REST_CERT_PATH) + data = r.json() + formatted_seed = format_seed_raw( data['cipher_seed_mnemonic'] ) print(formatted_seed) \ No newline at end of file diff --git a/rootfs/standard/usr/bin/mynode_post_upgrade.sh b/rootfs/standard/usr/bin/mynode_post_upgrade.sh index 7263037e..0d4a5f05 100755 --- a/rootfs/standard/usr/bin/mynode_post_upgrade.sh +++ b/rootfs/standard/usr/bin/mynode_post_upgrade.sh @@ -195,7 +195,7 @@ if ! skip_base_upgrades ; then # Install any pip3 software pip3 install --upgrade pip setuptools wheel - pip3 install lnd-grpc gnureadline docker-compose pipenv bcrypt pysocks redis --no-cache-dir + pip3 install gnureadline docker-compose pipenv bcrypt pysocks redis systemd --no-cache-dir pip3 install flask pam python-bitcoinrpc prometheus_client psutil transmissionrpc --no-cache-dir pip3 install qrcode image pyudev --no-cache-dir diff --git a/setup/setup_device.sh b/setup/setup_device.sh index 3497ed8a..9b2f4c4d 100755 --- a/setup/setup_device.sh +++ b/setup/setup_device.sh @@ -276,7 +276,7 @@ fi # Install Python3 specific tools (run multiple times to make sure success) pip3 install --upgrade pip wheel setuptools -pip3 install lnd-grpc gnureadline docker-compose pipenv bcrypt pysocks redis --no-cache-dir +pip3 install gnureadline docker-compose pipenv bcrypt pysocks redis systemd --no-cache-dir pip3 install flask pam python-bitcoinrpc prometheus_client psutil transmissionrpc --no-cache-dir pip3 install qrcode image pyudev --no-cache-dir