Advertisement
1vannn

forceUpdate

May 31st, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. local pasteID = "http://pastebin.com/raw.php?i=92vuEff9"
  2. pasteContent = http.get(pasteID)
  3. Paste = pasteContent.readAll()
  4. pasteContent.close()
  5. function update()
  6. file = fs.open("startup","r")
  7. contents = file.readAll()
  8. file.close()
  9. if (Paste ~= contents) then
  10. print("Updating program...")
  11. shell.run("delete","check")
  12. wFile = fs.open("check","w")
  13. wFile.write(Paste)
  14. wFile.close()
  15. sleep(2)
  16. os.reboot()
  17. end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement