From 6c1f02fdad6ae29a4a30fd6267b8e296895b7a3e Mon Sep 17 00:00:00 2001 From: dawn-lc <30336566+dawn-lc@users.noreply.github.com> Date: Mon, 23 Jun 2025 08:59:54 +0800 Subject: [PATCH 1/2] Update oneclick-install-as-service.md --- guide/network/oneclick-install-as-service.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/guide/network/oneclick-install-as-service.md b/guide/network/oneclick-install-as-service.md index c78826d..a7889bb 100644 --- a/guide/network/oneclick-install-as-service.md +++ b/guide/network/oneclick-install-as-service.md @@ -15,11 +15,21 @@ sudo ./easytier-cli service install -w abc # 假设 EasyTier 的启动参数为 -w abc .\easytier-cli.exe service install -w abc ``` - ::: `install` 后的部分会作为 `easytier-core` 的启动参数。 +参数选项 +```bash +easytier-cli service install \ + --description "自定义服务描述" \ # 可选,默认使用包描述 + --display-name "显示名称" \ # 可选,服务显示名称 + --disable-autostart \ # 可选,禁用开机自启(默认启用) + --core-path /path/to/easytier-core \ # 可选,指定二进制路径 + --service-work-dir /工作目录路径 \ # 可选,指定工作目录 + 额外的运行时参数 # 可选,传递给 easytier-core 的参数 +``` + 服务安装成功后,可以使用以下命令对服务进行管理: - 启动服务: From caaf2daab4cf624e00546edf05b940a7c583c611 Mon Sep 17 00:00:00 2001 From: dawn-lc <30336566+dawn-lc@users.noreply.github.com> Date: Mon, 23 Jun 2025 09:10:47 +0800 Subject: [PATCH 2/2] Update oneclick-install-as-service.md --- guide/network/oneclick-install-as-service.md | 33 ++++++++++++++------ 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/guide/network/oneclick-install-as-service.md b/guide/network/oneclick-install-as-service.md index a7889bb..5aaeed1 100644 --- a/guide/network/oneclick-install-as-service.md +++ b/guide/network/oneclick-install-as-service.md @@ -19,17 +19,32 @@ sudo ./easytier-cli service install -w abc `install` 后的部分会作为 `easytier-core` 的启动参数。 -参数选项 -```bash -easytier-cli service install \ - --description "自定义服务描述" \ # 可选,默认使用包描述 - --display-name "显示名称" \ # 可选,服务显示名称 - --disable-autostart \ # 可选,禁用开机自启(默认启用) - --core-path /path/to/easytier-core \ # 可选,指定二进制路径 - --service-work-dir /工作目录路径 \ # 可选,指定工作目录 - 额外的运行时参数 # 可选,传递给 easytier-core 的参数 +完整示例: +::: code-group + +```sh [Linux] +# 假设 EasyTier 的启动参数为 -w abc +sudo ./easytier-cli service install \ + --description "自定义服务描述" \ # 可选,默认使用包描述 + --display-name "显示名称" \ # 可选,服务显示名称 + --disable-autostart \ # 可选,禁用开机自启(默认启用) + --core-path /path/to/easytier-core \ # 可选,指定二进制路径 + --service-work-dir /工作目录路径 \ # 可选,指定工作目录 + -- -w abc # 可选,传递给 easytier-core 的参数 ``` +```powershell [Windows] +# 假设 EasyTier 的启动参数为 -w abc +.\easytier-cli.exe service install ` + --description "自定义服务描述" ` # 可选,默认使用包描述 + --display-name "显示名称" ` # 可选,服务显示名称 + --disable-autostart ` # 可选,禁用开机自启(默认启用) + --core-path /path/to/easytier-core ` # 可选,指定二进制路径 + --service-work-dir /工作目录路径 ` # 可选,指定工作目录 + -- -w abc # 可选,传递给 easytier-core 的参数 +``` +::: + 服务安装成功后,可以使用以下命令对服务进行管理: - 启动服务: