fix: install updater alongside startup script
Download the update helper during install and expose it from the cloud server so new hosts can run manual updates immediately.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
local STATION_BROADCAST_URL = "http://stabadmin.fse-media.group/downloads/station_broadcast.lua"
|
||||
local UPDATE_SCRIPT_URL = "http://stabadmin.fse-media.group/downloads/update_station_broadcast.lua"
|
||||
|
||||
local function fetch(url)
|
||||
if not http then
|
||||
@@ -64,7 +65,8 @@ local function downloadTo(url, path)
|
||||
end
|
||||
|
||||
local targets = {
|
||||
{ url = STATION_BROADCAST_URL, path = shell.resolve("/startup") }
|
||||
{ url = STATION_BROADCAST_URL, path = shell.resolve("/startup") },
|
||||
{ url = UPDATE_SCRIPT_URL, path = shell.resolve("/update_station_broadcast.lua") }
|
||||
}
|
||||
|
||||
for _, t in ipairs(targets) do
|
||||
@@ -76,4 +78,5 @@ for _, t in ipairs(targets) do
|
||||
end
|
||||
|
||||
print("Install complete.")
|
||||
print("Update helper installed as /update_station_broadcast.lua")
|
||||
print("Run 'reboot' to start StationBroadcast on boot.")
|
||||
|
||||
Reference in New Issue
Block a user