Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --set program to run
- local modemside = ""
- local monitorside = "" --OPTIONAL
- local lightid= "" --OPTIONAL]
- local lightside= "" --OPTIONAL
- rednet.open(modemside)
- shell.run("delete modemside")
- shell.run("delete monitorside")
- shell.run("delete lightid")
- shell.run("delete lightside")
- local h = fs.open("modemside", "w")
- h.write(modemside)
- h.close()
- local h = fs.open("monitorside", "w")
- h.write(monitorside)
- h.close()
- local h = fs.open("lightid", "w")
- h.write(lightid)
- h.close()
- local h = fs.open("lightside", "w")
- h.write(lightside)
- h.close()
- print("WIS OS")
- print("LOADING...")
- print("update check...")
- shell.run("delete lighton")
- shell.run("pastebin","get","Hajkj8GX,"lighton")
- shell.run("delete lightoff")
- shell.run("pastebin","get","e6hJEH96","lightoff")
- print("update successful")
- print("running...")
- shell.run("fg lighton")
- shell.run("bg lightoff")
- while true do
- local senderId, message, protocol = rednet.receive()
- if senderId == 40 then
- if message == "update" then
- os.reboot()
- end
- end
- end
Add Comment
Please, Sign In to add comment