update wizard

pull/7/head
Jeff Becker 6 years ago
parent 2083ac90e2
commit 6c5873c441

@ -5,4 +5,4 @@ if [ ! -d v ] ; then
echo "setting up wizard for the first time..."
python3 -m venv v && v/bin/pip install -r "$root/requirements.txt" &> /dev/null || echo "failed"
fi
v/bin/python "$root/lokinet.py"
v/bin/python "$root/lokinet.py" $@

@ -30,16 +30,21 @@ def genconf(rootdir):
for ifname, ip in yield_public_addresses():
conf['bind'][ifname] = '1090'
print("using public address {}".format(ip))
return conf
break
else:
print("This machine has no public network addresses")
return conf
def main():
def main(args):
fname = 'daemon.ini'
if len(args) == 1:
fname = args[0]
conf = genconf(os.path.realpath('.'))
if conf:
with open('daemon.ini', 'w') as f:
with open(fname, 'w') as f:
conf.write(f)
print("wrote config to {}".format(fname))
if __name__ == '__main__':
main()
import sys
main(sys.argv[1:])

Loading…
Cancel
Save