E5SubBot icon indicating copy to clipboard operation
E5SubBot copied to clipboard

开机自动启动程序

Open Mitchell08 opened this issue 2 years ago • 1 comments

请教如何开机自动启动程序,使用二进制部署,如下图。谢谢大家!

image

Mitchell08 avatar Feb 13 '23 15:02 Mitchell08

寫進 Systemd 服務。我將二進制文件放在 /usr/local/bin ,配置文件和 data 放在 /usr/local/etc 路徑下,大致如下

[Unit]
Description=E5SubBot Service
After=network.target

[Service]
WorkingDirectory=/usr/local/etc/E5SubBot
ExecStart=/usr/local/bin/E5SubBot
Restart=on-failure

[Install]

WantedBy=multi-user.target

image

image

Debcharon avatar Mar 20 '23 15:03 Debcharon