mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-12-28 08:59:37 -05:00
Added rnsd utility
This commit is contained in:
parent
acae9e34c2
commit
544e15afdf
35
RNS/Utilities/rnsd.py
Normal file
35
RNS/Utilities/rnsd.py
Normal file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import RNS
|
||||
import argparse
|
||||
|
||||
from RNS._version import __version__
|
||||
|
||||
|
||||
def program_setup(configdir):
|
||||
reticulum = RNS.Reticulum(configdir = configdir)
|
||||
RNS.log("Started rnsd version {version}".format(version=__version__), RNS.LOG_INFO)
|
||||
while True:
|
||||
input()
|
||||
|
||||
def main():
|
||||
try:
|
||||
parser = argparse.ArgumentParser(description="Nomad Network Client")
|
||||
parser.add_argument("--config", action="store", default=None, help="path to alternative Reticulum config directory", type=str)
|
||||
parser.add_argument("--version", action="version", version="rnsd {version}".format(version=__version__))
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.config:
|
||||
configarg = args.config
|
||||
else:
|
||||
configarg = None
|
||||
|
||||
program_setup(configdir = configarg)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("")
|
||||
exit()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in New Issue
Block a user