Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Local Variables ]]--
- -- Root Directories & Extentions --
- local Root = ".Network/"
- local uRoot = ".Network/Users/"
- --[[ Functions ]]--
- -- Misc --
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function Reset()
- clear()
- term.setTextColor(colors.red)
- write("E-Mail Network")
- term.setTextColor(colors.yellow)
- printTR("- Installer -")
- term.setTextColor(colors.white)
- printTM("[ Server Edition ]")
- w, h = term.getSize()
- print(string.rep("-", w)) write("\n")
- end
- function printTR( text )
- w, h = term.getSize()
- term.setCursorPos(w - #text, 1)
- write(text)
- end
- function printTM( text )
- local w, h = term.getSize()
- term.setCursorPos((w - #text) / 2, 1)
- write(text)
- end
- function printC( text )
- local x, y = term.getSize()
- term.setCursorPos(( x - string.len(text)) / 2, y / 2)
- write( text )
- end
- -- Interface --
- Reset()
- term.setTextColor(colors.yellow)
- print("Setting Up Directories...")
- os.sleep(1)
- fs.makeDir(Root)
- fs.makeDir(uRoot)
- print("Getting Needed Files...")
- Network = http.get("http://dl.dropbox.com/u/39147094/E-Mail%20Network/Server/Network.lua")
- Startup = http.get("http://dl.dropbox.com/u/39147094/E-Mail%20Network/Server/Startup")
- f = fs.open("startup", "w")
- f.write(Startup.readAll())
- f.close()
- f = fs.open(Root .. "Network.lua", "w")
- f.write(Network.readAll())
- f.close()
- term.setTextColor(colors.lime)
- print("\nDone!")
- os.sleep(1)
- Reset()
- print("E-Mail Server Downloaded Successfully!\nEdition: Server")
- term.setTextColor(colors.yellow)
- print("\n(-)Ok")
- repeat
- event, key = os.pullEvent("key")
- os.sleep(0.1)
- until key == 28
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement