diff --git a/scripts/astrbot.service b/scripts/astrbot.service index fdf891be9..b99a0d946 100644 --- a/scripts/astrbot.service +++ b/scripts/astrbot.service @@ -1,5 +1,7 @@ +# user service [Unit] Description=AstrBot Service +Documentation=https://github.com/AstrBotDevs/AstrBot After=network-online.target Wants=network-online.target @@ -9,6 +11,9 @@ WorkingDirectory=%h/.local/share/astrbot ExecStart=/usr/bin/sh -c '/usr/bin/astrbot run || { /usr/bin/astrbot init && /usr/bin/astrbot run; }' Restart=on-failure RestartSec=5 +StandardOutput=journal +StandardError=journal +SyslogIdentifier=astrbot-%u Environment=PYTHONUNBUFFERED=1 [Install]