dsh-restart
其他 活跃维护

dsh-restart

yoggu/dsh-restart

新增 /dsh-restart 斜杠指令,输入即自动重启运行中的进程,免去手动查 PID 和 kill 的麻烦,进程崩溃或改配置后能快速恢复工作状态。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
27 KB
仓库大小
2 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:yoggu/dsh-restart
git clone https://github.com/yoggu/dsh-restart.git
git clone git@github.com:yoggu/dsh-restart.git
README.md main

dsh-restart

Adds /dsh-restart to DSH Web. It schedules a restart of the current Harness process or its own systemd user service after a short delay, allowing the command response to reach the browser.

Install

Install the latest tagged GitHub release:

dsh plugin --profile web add 'https://github.com/yoggu/dsh-restart.git#v0.1.3'

Or download the source and link the local checkout:

git clone --branch v0.1.3 --depth 1 https://github.com/yoggu/dsh-restart.git
cd dsh-restart
dsh plugin --profile web add "link:$(pwd)"

Keep a linked checkout in place while the plugin is installed. Use the profile you actually run if it is not web.

Restart DSH Web if necessary to load the command. No credentials are required, but the DSH process must be allowed to restart itself or schedule a systemd user timer.

To uninstall: dsh plugin --profile web remove dsh-restart.

Usage

/dsh-restart       # configured delay (default: 1 second)
/dsh-restart 10    # restart in 10 seconds

The Plugins → Restart page configures mode (auto, unit, exec), systemd unit, delaySeconds (1–60), and execStdio. auto uses its own systemd unit when detected, otherwise starts a successor process. The running turn is interrupted and the web page reconnects afterward. Only trusted users with access to the DSH command surface should be able to invoke it.

Language and tests

Settings are in English. Command descriptions and responses default to English; set the plugin's Command language to Deutsch (language: de) to preserve the previous German command wording. This setting is independent of the Harness global UI language; unset or unsupported values fall back to English. Responses read the live setting; the menu description is selected when the command mounts.

Run npm test after installing peer dependencies. Tests mock process spawning, cgroup reads, and exit timers; they never call systemd or restart a process.

License

MIT; see LICENSE.