summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-04-04 02:26:24 +0100
committerubq323 <ubq323@ubq323.website>2024-04-04 02:26:24 +0100
commit308dfddea8cbee7dc486c83706788e31f6e0e286 (patch)
tree3e7b281b17a9cffa4d99f9b2ec275f2b06b1babd
parente9b1872709d8824a9489718c8dde0a5cc6ceccb7 (diff)
launch cactus
-rw-r--r--cactus.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/cactus.lua b/cactus.lua
index 17307fc..c3eb38e 100644
--- a/cactus.lua
+++ b/cactus.lua
@@ -171,4 +171,15 @@ local function loop()
os.sleep(120)
end
-mainloop()
+local function main()
+ setup()
+ while true do loop() end
+end
+
+while true do
+ local ok,err = pcall(main)
+ if not ok then print(error) end
+ os.sleep(5)
+end
+end
+