/v1/daemon/restartPOSTPOST /v1/daemon/stop, then runs the binary on disk
again (or executable) with the same arguments and environment. Use it after
a rebuild or an update. The pid stays the same; startedAt changes.
Leases live in state.db and stay valid.ghosthand tunnel url --new-token. The unix socket needs no tokenapplication/json"/usr/local/bin/ghosthand"daemon-busy and the
daemon keeps running. macOS screen capture needs seconds to a minute after a
restart, so an agent holding a lease would lose its screen. The CLI sets it
when it restarts the daemon by itself.title and detail are for people.curl -X POST "https://ghosthand.dev/macs/studio/v1/daemon/restart" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "executable": "/usr/local/bin/ghosthand", "ifIdle": true }'
{ "message": "daemon restarting" }