SilentWarrior

altarStartup

Nov 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. -- pastebin get UeWXmPEA startupAltar
  2.  
  3.  
  4. --local fileName = shell.getRunningProgram()
  5. local fileName = "altar"
  6. local paste = "aMbHSphb"
  7.  
  8. while true do
  9.   --term.setCursorPos( 1, -5 )                        -- Hide the pastebin retrivial  
  10.   if fs.exist(fileName) then
  11.     print("Deleting program: "..fileName)
  12.     fs.delete(fileName)
  13.   end
  14.   print("Updating program: "..fileName)
  15.   shell.run( "pastebin", "get", paste, fileName )
  16.   print("Starting program: "..fileName)
  17.   shell.run( fileName )
  18.   print("Restarting the program")
  19.   sleep(5)
  20. end
Advertisement
Add Comment
Please, Sign In to add comment