- Inefficient Polling: Constant shell execution of
tailscale file getandfindevery 15s. - Resource Usage: Bash overhead for heavy logic (integrity, virus scan, rate limiting).
- Reliability: Shell script
trapand background process management can be flaky for long-running services.
- Reduce Polling Frequency / Move to Events: Tailscale doesn't support inotify for the internal Taildrop buffer, but we can optimize how we check.
- Leaner Logic: Strip out heavy "enterprise" features (virus scanning, complex rate limiting) if not needed, or make them truly optional and lightweight.
- Memory/CPU: Minimize sub-process spawning.
- Rewrite core loop to be more "quiet" when idle.
- Use a more robust language (Go or Rust) if we want true "stable/reliable" but keep it as a simple binary.
- Alternative: Refactor the Bash script to use
tailscale status --jsonfor cleaner checks.
- Do you really need ClamAV (virus scan) and Rate Limiting for a personal receiver?
- Should we consider a Go rewrite for a single static binary? (Much more stable/reliable).