Add agent uninstall script and UI reveal

Lets a server be cleanly removed from agent management: uninstall.sh
stops/disables the systemd timer and deletes the unit files, the
installed script, and the credentials env file, without touching the
server's entry or task history in the app. install.sh now prints the
uninstall command on success, and the Servers page has an "Uninstall"
button that reveals the same command (safe to show anytime since it
carries no secret).
This commit is contained in:
bobban committed 2026-09-02 22:21:05 +02:00
1 parent 5269499520
commit 0615866311
5 files changed
+79

No files matched your search

+20
View File
@@ -85,6 +85,26 @@ Tasks that stop appearing in a server's report are marked **stale** rather
than deleted (so a temporary agent failure doesn't wipe history) and are
hidden by default — toggle "Show stale/missing tasks" to see them.
To remove the agent from a server, run:
```sh
curl -fsSL https://schedule.example.lan/agent/linux/uninstall.sh | bash
```
This stops and deletes the systemd timer/service, the installed script, and
`/etc/schedule-task-manager-agent.env` (which holds the API token). It does
not delete the server's entry or task history in the app — the same "Uninstall"
button on the Servers page shows this command, and "Delete" removes the entry
entirely if you no longer want it tracked.
## 5. Manually tracked tasks
Not everything is discoverable by the agent — e.g. a scheduled job running
inside a Docker container. Use **Add task** on the Dashboard to log those by
hand. Manually entered tasks are never touched by agent reports (they have
their own `origin`), so they won't be marked stale or overwritten by the next
sync.
## Environment variables
See [`.env.example`](.env.example) for the full list with descriptions.