From 8af901e371c2614eb9655efad26d70ff249a9f54 Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Thu, 4 Jul 2024 13:52:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20systemd=20=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rick.chan --- Ecology/LubanCat1/LubanCat1_安装_Weston.md | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Ecology/LubanCat1/LubanCat1_安装_Weston.md b/Ecology/LubanCat1/LubanCat1_安装_Weston.md index 2d1b6a8..3d1e414 100644 --- a/Ecology/LubanCat1/LubanCat1_安装_Weston.md +++ b/Ecology/LubanCat1/LubanCat1_安装_Weston.md @@ -104,3 +104,27 @@ sudo ninja -C build/ install ```bash weston --tty=2 ``` + +systemd service(/usr/lib/systemd/system/weston.service)如下: + +```service +[Unit] +Description=Weston +# After=syslog.target +# After=network.target +# After=multi-user.target +# After=graphical.target +After=plymouth-quit-wait.service +# After=systemd-logind.service + +[Service] +RestartSec=2s +Type=simple +User=root +Group=root +ExecStart=weston-launch --tty=/dev/tty2 --user=root +Restart=always + +[Install] +WantedBy=multi-user.target +```