unera/dsh-graceful-restart ↗★ 1
@dr-co/dsh-graceful-restart
Graceful, idle-aware restart of the DSH host: dsh_restart registers a request that waits for every agent (subagents included) to finish, logs the causes, ends the process after a quiet window, wakes the sessions that asked for a note once the host is up again, and tells the session that started a background job that the restart killed it.
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:unera/dsh-graceful-restart說明文件
閱讀完整 README ↗Configuration
Everything is edited on the plugin's own page: Plugins → dsh-graceful-restart.
The card is rendered by client.js against the plugin's Config schema, so the
fields are the same ones the config file holds (volatile() fields are the ones
the settings service persists). Language: English, Russian, Chinese.
| Field | Default | Meaning |
|---|---|---|
exitMethod | systemctl | systemctl — systemctl --user restart , the only method that comes back by itself under a systemd user unit. command — run exitCommand. kill — SIGTERM to itself. exit — process.exit(0). |
serviceUnit | dsh-server | Unit restarted by systemctl. |
exitCommand | — | Shell command for command, started detached from the dying process. |
quietSeconds | 10 | How long the host must stay idle after the last activity, re-checked every second. |
waitForJobs | false | Hold the restart while a background job (run_in_background, job_*) is running or stopping. Off by default on purpose: a dev server that never ends would postpone the restart forever. When it is on, the job id and label are logged once, and they are counted in the card's status line. |
notifyJobOwners | true | After the restart, tell each session whose background job the restart killed: one note per session, listing all of that session's interrupted jobs. The switch is greyed out in the card while waitForJobs is on — then the restart waits for the jobs instead of killing them, so there is nothing to report. |
reasonFile | — | Optional file that receives the causes before the restart, one line. On a host where the unit's ExecStartPost prints a start-up report, point this at the file that report reads (for example /home/dsh/.cache/dsh-restart-reason.txt). |
language | en | Language of tool descriptions, tool answers and the post-restart note: en, ru, zh. |
stateDir | $DSH_HOME/graceful-restart | Requests, event log and pending notifications. |