47 lines
924 B
Lua
47 lines
924 B
Lua
--you may change these values
|
|
local repo = "https://git.brulijam.com/brulijam/Computercraft/raw/branch/main/src"
|
|
|
|
print("[Booting]")
|
|
|
|
|
|
local motd = settings.get("motd.enable")
|
|
if motd then
|
|
shell.run("set motd.enable false")
|
|
end
|
|
|
|
|
|
--fetch sync script
|
|
getRequest = http.get(repo .. "/brulijam/sync.lua")
|
|
file = fs.open("/brulijam/sync.lua", "w")
|
|
file.write(getRequest.readAll())
|
|
file.close()
|
|
|
|
|
|
--task.lua contains stuff that should be done after boot
|
|
if not (fs.exists("brulijam/task.lua")) then
|
|
file = fs.open("brulijam/task.lua", "a")
|
|
file.writeLine("--use this file to execute programs")
|
|
file.close()
|
|
end
|
|
shell.run("brulijam/task.lua")
|
|
|
|
|
|
--execute sync script
|
|
shell.run("/brulijam/sync.lua")
|
|
|
|
|
|
--set label if not set
|
|
shell.run("/brulijam/setLabel.lua")
|
|
|
|
--create networking key
|
|
shell.run("/brulijam/lib/createNetworkingKey.lua")
|
|
|
|
shell.run("/brulijam/systemlock.lua")
|
|
|
|
--you shall not pass systemlock
|
|
os.reboot()
|
|
|
|
|
|
|
|
|