Improve setup

This commit is contained in:
osmarks 2018-04-29 15:36:36 +01:00
parent 4db2dad592
commit 77f0a35230

View File

@ -16,4 +16,16 @@ end
print "Files downloaded. Either client.lua or server.lua should be run on startup." print "Files downloaded. Either client.lua or server.lua should be run on startup."
print "Opening config editor..." print "Opening config editor..."
shell.run "edit conf" shell.run "edit conf"
fs.move("conf.lua", "conf") -- edit is really stupid, so un-.lua file pcall(fs.move, "conf.lua", "conf") -- edit is really stupid, so un-.lua output file
local ty
repeat
print "Would you like this node set up as a server or client?"
ty = read()
until ty == "server" or ty == "client"
local f = fs.open("startup", "w")
f.write("shell.run '" .. ty .. "'")
f.close()
print "Done! Reboot or run startup."