增加 systemd 服务。

Signed-off-by: rick.chan <cy@haoan119.com>
This commit is contained in:
rick.chan 2024-07-04 13:52:12 +08:00
parent e5d6ae0e09
commit 8af901e371
1 changed files with 24 additions and 0 deletions

View File

@ -104,3 +104,27 @@ sudo ninja -C build/ install
```bash ```bash
weston --tty=2 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
```