mirror of
https://github.com/StijnBTC/Ringtools.git
synced 2025-02-28 07:54:09 +01:00
automaticly detect umbrel OS and change default lnd directory
This commit is contained in:
parent
eeee55b19d
commit
0786f7d426
2 changed files with 13 additions and 2 deletions
10
ringtools.py
10
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",
|
||||
|
|
5
utils.py
Normal file
5
utils.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
import os
|
||||
|
||||
|
||||
def is_umbrel():
|
||||
return os.uname().nodename == "umbrel"
|
Loading…
Add table
Reference in a new issue