|
|
@ -48,7 +48,7 @@ def _read_macaroon(lnd_macaroon_file): |
|
|
|
def check_locked(password_file, lnd_cert_file, lnd_macaroon_file, host="localhost", port="8080", verbose=False): |
|
|
|
# check locked |
|
|
|
if verbose: |
|
|
|
print("Checking for lock with the following data:") |
|
|
|
print("Checking for lock") |
|
|
|
|
|
|
|
passwd_b64 = _read_pwd(password_file) |
|
|
|
macaroon_hex_dump = _read_macaroon(lnd_macaroon_file) |
|
|
@ -76,7 +76,7 @@ def check_locked(password_file, lnd_cert_file, lnd_macaroon_file, host="localhos |
|
|
|
|
|
|
|
def unlock(password_file, lnd_cert_file, lnd_macaroon_file, host="localhost", port="8080", verbose=False): |
|
|
|
if verbose: |
|
|
|
print("Trying to unlock with the following data:") |
|
|
|
print("Trying to unlock") |
|
|
|
|
|
|
|
passwd_b64 = _read_pwd(password_file) |
|
|
|
macaroon_hex_dump = _read_macaroon(lnd_macaroon_file) |
|
|
@ -146,9 +146,9 @@ def main(): |
|
|
|
|
|
|
|
if check_locked(password_file, lnd_cert_file, lnd_macaroon_file, |
|
|
|
host=options.host, port=options.port, verbose=options.verbose): |
|
|
|
if options.verbose: |
|
|
|
print("\033[93m{}\033[00m".format("Locked")) |
|
|
|
else: |
|
|
|
if options.verbose: |
|
|
|
print("\033[92m{}\033[00m".format("Not Locked")) |
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|