Suppenbiatch

DSU Installer

Sep 23rd, 2016
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. local id = os.getComputerID()
  2. shell.run("clear")
  3. print("Starting value?")
  4. local begin = tonumber(read())
  5.  
  6. print("Ending value?")
  7. local stop = tonumber(read())
  8.  
  9. print("Monitor number?")
  10. local monitor = tonumber(read())
  11.  
  12. function fwrite(path, text)
  13.         local file = assert(io.open(path, "a"))
  14.         file:write(text.."\n")
  15.         file:close()
  16. end
  17. fs.delete(id.."/")
  18. fwrite(id.."/config", "Beginning at: "..begin)
  19. fwrite(id.."/config", "Ending at: "..stop)
  20. fwrite(id.."/config", "Monitor: " ..monitor)
  21.  
  22. fs.delete("startup")
  23. shell.run("pastebin", "get", "eTGnUD84", "startup")
  24. os.reboot()
Add Comment
Please, Sign In to add comment