diff --git a/ringtools.py b/ringtools.py index b0f8588..62bbe23 100644 --- a/ringtools.py +++ b/ringtools.py @@ -4,6 +4,7 @@ import sys from lnd import Lnd from output import Output from status import Status +from utils import is_umbrel class RingTools: @@ -38,11 +39,16 @@ def get_argument_parser(): "like to use", default="help", ) + #If nodeos is Umbrel use the default umbrel lnd location + lnd_dir = "~/.lnd" + if is_umbrel(): + lnd_dir = "~/umbrel/umbrel/lnd/" + parser.add_argument( "--lnddir", - default="~/.lnd", + default=lnd_dir, dest="lnddir", - help="(default ~/.lnd) lnd directory", + help="(default ~/.lnd or ~/umbrel/umbrel/lnd/ when default umbrel installation) lnd directory", ) parser.add_argument( "--grpc", diff --git a/utils.py b/utils.py new file mode 100644 index 0000000..0f81d58 --- /dev/null +++ b/utils.py @@ -0,0 +1,5 @@ +import os + + +def is_umbrel(): + return os.uname().nodename == "umbrel"