Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion guide/network/oneclick-install-as-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,36 @@ sudo ./easytier-cli service install -w abc
# 假设 EasyTier 的启动参数为 -w abc
.\easytier-cli.exe service install -w abc
```

:::

`install` 后的部分会作为 `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 的参数
```
:::

服务安装成功后,可以使用以下命令对服务进行管理:

- 启动服务:
Expand Down