Написал телеграм-бота на .Net6. Опубликовал под Linux. В качестве исполняемого файла отлично работает.
В качества сервиса падает после запуска. После всех редактирований юнита sudo systemctl daemon-reload делал. Как быть?
syslog:
Jan 28 18:43:55 360554-penb2020 systemd[1]: Stopped KVLTbot service.
Jan 28 18:43:55 360554-penb2020 systemd[1]: Started KVLTbot service.
Jan 28 18:43:56 360554-penb2020 systemd[1]: kvltbot.service: Service hold-off time over, scheduling restart.
Jan 28 18:43:56 360554-penb2020 systemd[1]: kvltbot.service: Scheduled restart job, restart counter is at 1596.
Jan 28 18:43:56 360554-penb2020 systemd[1]: Stopped KVLTbot service.
Jan 28 18:43:56 360554-penb2020 systemd[1]: Started KVLTbot service.
Jan 28 18:43:58 360554-penb2020 systemd[1]: kvltbot.service: Service hold-off time over, scheduling restart.
Jan 28 18:43:58 360554-penb2020 systemd[1]: kvltbot.service: Scheduled restart job, restart counter is at 1597.
Описание юнита:
[Unit]
Description=KVLTbot service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=root
Group=root
ExecStart=/kvltbot/KVLTbot
WorkingDirectory=/kvltbot
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=%n
[Install]
WantedBy=multi-user.target
Статус:
● kvltbot.service - KVLTbot service
Loaded: loaded (/etc/systemd/system/kvltbot.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) since Sat 2023-01-28 19:46:10 MSK; 567ms ago
Process: 2964 ExecStart=/kvltbot/KVLTbot (code=exited, status=0/SUCCESS)
Main PID: 2964 (code=exited, status=0/SUCCESS)