Skip to content

Commit c7e6db6

Browse files
committed
chore: remove auto-updater
Drops the in-process self-update mechanism entirely: * delete updater/ package * remove -autoupdate CLI flag * remove AutoUpdate / UpdateURL / ChecksumURL config fields and their default-value initialisers (existing JSON keys are silently ignored on load — no migration needed) * remove auto_update from /api/settings GET + PUT * remove the AUTO UPDATE toggle from the admin Settings page * drop the updater bullet from README's What's new and the -autoupdate row from the CLI flag table * drop updater/ from the ARCHITECTURE source tree Distros and Homebrew take ownership of the binary; an in-process self-update conflicts with package-manager-managed installs and brings little value for the source-build / release-binary path either. Manual install of a new release replaces the binary with the same effort as before, minus the moving pieces.
1 parent 78a19d1 commit c7e6db6

9 files changed

Lines changed: 6 additions & 237 deletions

File tree

ARCHITECTURE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ tinyice/
8282
│ ├── tasks.go # Background tasks (reporting, stats recording).
8383
│ ├── socket_*.go # OS-specific socket syscalls (SO_REUSEPORT).
8484
│ └── templates/ # HTML/CSS/JS assets.
85-
└── updater/ # Self-update mechanism (GitHub Releases).
8685
```
8786

8887
## 4. Key Data Flows

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ See [Webhooks](#webhooks) for the full reference.
149149
- Sessions have absolute 7-day and sliding 24-hour expiry with a periodic reaper. Login rotates the cookie (no fixation). Deleted users have their live sessions purged immediately.
150150
- Login is constant-time — bcrypt always runs, even for unknown usernames.
151151
- `TrustedProxies` config + `X-Forwarded-For` handling so scan-detection and bans work behind nginx / Caddy / Traefik without auto-whitelisting loopback.
152-
- Auto-updater verifies SHA-256 from `checksums.txt` before overwriting the running binary.
153152
- RTMP shutdown closes live publisher connections so `Ctrl+C` quits within seconds, even mid-stream.
154153
- CSRF on every mutating admin form. Super-admin gates on transcoder/webhook CRUD. Webhook/relay URLs reject loopback and RFC1918 addresses (SSRF).
155154
- `SaveConfig` is serialised across goroutines so concurrent admin writes can't shred the JSON.
@@ -516,7 +515,6 @@ curl -s "https://air.radiotime.com/Playing.ashx?partnerId=$P&partnerKey=$K&id=$I
516515
| `-json-logs` | `false` | Structured JSON logging |
517516
| `-daemon` | `false` | Run in background |
518517
| `-pid-file` | | PID file path |
519-
| `-autoupdate` | `false` | Check + apply signed updates every hour |
520518

521519
Subcommands: `./tinyice dump-config`, `./tinyice set <key> <value>`, `./tinyice get <key>`, `./tinyice reload`.
522520

config/config.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,6 @@ type Config struct {
256256
DirectoryListing bool `json:"directory_listing"`
257257
DirectoryServer string `json:"directory_server"`
258258

259-
// Auto Update
260-
AutoUpdate bool `json:"auto_update"`
261-
UpdateURL string `json:"update_url"`
262-
ChecksumURL string `json:"checksum_url"`
263-
264259
// Internal Streamer (AutoDJ)
265260
AutoDJs []*AutoDJConfig `json:"autodjs"`
266261

@@ -401,12 +396,6 @@ func (config *Config) setBasicDefaults() {
401396
if config.DirectoryServer == "" {
402397
config.DirectoryServer = "http://dir.xiph.org/cgi-bin/yp-cgi"
403398
}
404-
if config.UpdateURL == "" {
405-
config.UpdateURL = "https://github.com/DatanoiseTV/tinyice/releases/latest/download/tinyice-{{os}}-{{arch}}"
406-
}
407-
if config.ChecksumURL == "" {
408-
config.ChecksumURL = "https://github.com/DatanoiseTV/tinyice/releases/latest/download/checksums.txt"
409-
}
410399
// Existing configs are already set up
411400
if config.AdminPassword != "" && !config.SetupComplete {
412401
config.SetupComplete = true

main.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"github.com/DatanoiseTV/tinyice/config"
1919
"github.com/DatanoiseTV/tinyice/logger"
2020
"github.com/DatanoiseTV/tinyice/server"
21-
"github.com/DatanoiseTV/tinyice/updater"
2221
"go.uber.org/zap"
2322
)
2423

@@ -39,7 +38,6 @@ var (
3938
daemon = flag.Bool("daemon", false, "Run in background (daemon mode)")
4039
pidFile = flag.String("pid-file", "", "Path to PID file")
4140
authLogFile = flag.String("auth-log-file", "", "Path to separate authentication audit log")
42-
autoupdate = flag.Bool("autoupdate", false, "Enable automatic updates and zero-downtime hot swapping")
4341
forceSetup = flag.Bool("force-setup", false, "Force setup wizard even if config already has an admin password")
4442
)
4543

@@ -141,18 +139,8 @@ func main() {
141139
if *domains != "" {
142140
cfg.Domains = strings.Split(*domains, ",")
143141
}
144-
if *autoupdate {
145-
cfg.AutoUpdate = true
146-
}
147-
148142
srv := server.NewServer(cfg, authLogger, Version, Commit, setupToken)
149143

150-
// Start Updater if enabled
151-
if cfg.AutoUpdate {
152-
upd := updater.NewUpdater(cfg, srv)
153-
go upd.Start(context.Background())
154-
}
155-
156144
// Signal handling
157145
sigs := make(chan os.Signal, 1)
158146
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP)

server/frontend/dist/assets/admin-xUGzoVVk.js renamed to server/frontend/dist/assets/admin-C3NtC-J8.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/frontend/dist/src/entries/admin.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<title>TinyIce</title>
7-
<script type="module" crossorigin src="/assets/admin-xUGzoVVk.js"></script>
7+
<script type="module" crossorigin src="/assets/admin-C3NtC-J8.js"></script>
88
<link rel="modulepreload" crossorigin href="/assets/hooks.module-bNCB_ZdL.js">
99
<link rel="modulepreload" crossorigin href="/assets/signals.module-Tnv-RP0P.js">
1010
<link rel="modulepreload" crossorigin href="/assets/sse-BzDsymyq.js">

server/frontend/src/pages/admin/Settings.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ interface ServerSettings {
1414
admin_email: string
1515
low_latency_mode: boolean
1616
directory_listing: boolean
17-
auto_update: boolean
1817
audit_enabled: boolean
1918
}
2019

@@ -41,7 +40,6 @@ const server = signal<ServerSettings>({
4140
admin_email: '',
4241
low_latency_mode: false,
4342
directory_listing: false,
44-
auto_update: false,
4543
audit_enabled: false,
4644
})
4745

@@ -89,7 +87,6 @@ async function saveServer() {
8987
max_listeners: server.value.max_listeners,
9088
low_latency_mode: server.value.low_latency_mode,
9189
directory_listing: server.value.directory_listing,
92-
auto_update: server.value.auto_update,
9390
audit_enabled: server.value.audit_enabled,
9491
})
9592
} catch { /* empty */ }
@@ -186,10 +183,6 @@ export function Settings() {
186183
<label class="font-mono text-[10px] tracking-[2px] text-text-tertiary">DIRECTORY LISTING</label>
187184
<Toggle checked={server.value.directory_listing} onChange={(v) => updateServer('directory_listing', v)} label="Directory listing" />
188185
</div>
189-
<div class="flex items-center justify-between">
190-
<label class="font-mono text-[10px] tracking-[2px] text-text-tertiary">AUTO UPDATE</label>
191-
<Toggle checked={server.value.auto_update} onChange={(v) => updateServer('auto_update', v)} label="Auto update" />
192-
</div>
193186
<div class="flex items-center justify-between">
194187
<div>
195188
<label class="font-mono text-[10px] tracking-[2px] text-text-tertiary">AUDIT LOGGING</label>

server/handlers_api_v2.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,7 +2401,6 @@ func (s *Server) apiGetSettings(w http.ResponseWriter, r *http.Request) {
24012401
"domains": s.Config.Domains,
24022402
"directory_listing": s.Config.DirectoryListing,
24032403
"directory_server": s.Config.DirectoryServer,
2404-
"auto_update": s.Config.AutoUpdate,
24052404
"audit_enabled": s.Config.AuditEnabled,
24062405
})
24072406
}
@@ -2455,11 +2454,6 @@ func (s *Server) apiUpdateSettings(w http.ResponseWriter, r *http.Request) {
24552454
s.Config.DirectoryListing = b
24562455
}
24572456
}
2458-
if v, ok := body["auto_update"]; ok {
2459-
if b, ok := v.(bool); ok {
2460-
s.Config.AutoUpdate = b
2461-
}
2462-
}
24632457
if v, ok := body["audit_enabled"]; ok {
24642458
if b, ok := v.(bool); ok {
24652459
s.Config.AuditEnabled = b

updater/updater.go

Lines changed: 0 additions & 192 deletions
This file was deleted.

0 commit comments

Comments
 (0)