From eb9c81c1a13ef7ea81a521f3bcda55653ff09f15 Mon Sep 17 00:00:00 2001 From: UVJkiNTQ <12570945+UVJkiNTQ@users.noreply.github.com> Date: Mon, 11 Jul 2022 21:29:04 +0800 Subject: [PATCH] add systemd unit example (#172) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 添加时区 * Update README.md 给例子添加更多可用参数 * 修正webui的描述 * 添加shell脚本示例 * 添加shell脚本示例 * Update README.md add systemd example --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 0986d34..0b00a3d 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,33 @@ Linux下以daemon进程启动,录像和日志文件保存在执行目录下, 、[Windows](https://blog.waitsaber.org/archives/169) 教程 与 [常见问题](https://blog.waitsaber.org/archives/167) 解决方案 +开机自启可参照以下模板创建systemd unit: + +创建service文件: +> $ nano ~/.config/systemd/user/biliupd.service +``` +[Unit] +Description=Biliup Startup +Documentation="https://biliup.github.io/biliup" +Wants=network-online.target +After=network-online.target + +[Service] +Type=simple +WorkingDirectory=[在此填入你的config所在目录] +ExecStart=/usr/bin/biliup -v +ExecReload=/usr/bin/biliup restart +ExecStop=/usr/bin/biliup stop + +[Install] +WantedBy=default.target +``` +启用service并启动: +```shell +$ systemctl --user enable biliupd +$ systemctl --user start biliupd +``` + **文档地址**: ## Docker使用 🔨