yizhixiaokong/dsh-simple-restart
Adds a restart button to DSH's Settings → General that relaunches the running dsh web process with the same invocation it was started with.
Solves a specific annoyance of client-side plugin work: a change to a client bundle only takes effect after the harness restarts, and the restart is a shell command that interrupts whatever you were doing. This plugin puts it in the UI — one row in Settings → General with a button that restarts the running dsh web process using the same invocation it was started with. The mechanism is the interesting design constraint, and the README explains it rather than hiding it: a process cannot replace itself, it can only stop, so something has to start the replacement, and that something is a helper that the old process launches before stepping aside. The hint line shows the host pid that is stepping aside and the helper's pid, and an HTTP API is documented alongside the button so the same action can be scripted. It is a small plugin, but it removes the one step that made every CSS or client fix feel expensive.
Install
dsh plugin --profile web add "github:yizhixiaokong/dsh-simple-restart"The README's GitHub install line, quoted exactly because the spec is quoted in the README; a pinned form is documented beside it (dsh plugin --profile web add "github:yizhixiaokong/dsh-simple-restart#v0.1.1"). A local checkout installs with dsh plugin --profile web add "$PWD", and once the package is published the bare npm form dsh plugin --profile web add dsh-simple-restart is also documented. One consequence of how it registers is stated plainly: because the settings row is read at boot, the button only appears after the next start, not immediately after install. Uninstall is dsh plugin --profile web remove dsh-simple-restart.
Compatibility
The README's Requirements table is the compatibility statement, and it is intentionally narrow to dsh web. The behaviour is honest about what it cannot do: the helper is detached and not supervised, so once it is running this package has no further control over it; a process started with unusual wrapper arguments (a shell function, a container entrypoint) falls back to running dsh with the same argv, which is right for dsh web and not for every wrapper. If the Host header carries no port the helper simply waits 1.5 seconds before starting the replacement, and the environment is inherited including the current working directory. Diagnostics are written to the temp directory and never cleaned up — small files, kept because finding them is the point.
Details
- Repo: yizhixiaokong/dsh-simple-restart
- Category: Development & Runtime
- Stars: 2
- Version: Installed from the GitHub repository; the README documents a pin at tag v0.1.1.
Alternatives
xxiaoxiong/dsh-prometheus · keyiadiannao/dsh-restart-button · Tang-mm95/dsh-single-instance-guard