This commit is contained in:
Julian Brammer 2024-06-09 20:57:09 +02:00
parent ab46ded6d3
commit 79c139a1f8
2 changed files with 11 additions and 1 deletions

View File

@ -45,8 +45,12 @@ function readFileAll(file)
return data
end
local function getNtfyAddress()
return readFileOneline("/brulijam/config/ntfy.txt")
end
function ntfy(msg)
http.post("https://ntfy.brammer.cc/8DI2nmDPVG6l7A0x", msg)
http.post(getNtfyAddress(), msg)
end
function splitStringToArray(inputStr)

View File

@ -49,6 +49,12 @@ if not (fs.exists("brulijam/task.lua")) then
end
shell.run("brulijam/task.lua")
--create ntfy file (can be changed later)
if not (fs.exists("brulijam/config/ntfy.txt")) then
file = fs.open("brulijam/config/ntfy.txt", "a")
file.writeLine("https://ntfy.brammer.cc/8DI2nmDPVG6l7A0x")
file.close()
end
--execute sync script
shell.run("/brulijam/sync.lua")