Systemd 显示 inactive dead 且无错误

Systemd 显示 inactive dead 且无错误

我正在尝试在 Ubuntu 18.04 上配置服务,但结果却是不活动的(死机)。这是我的服务文件:

[Unit]
Description=asdfondi website
Documentation=https://github.com/riccardi1997/asdfondi
After=network.target

[Service]
Environment=HOST=[hostname] DATABASE_URL=[database-url]
Type=simple
User=salr
ExecStart=/home/salr/.nvm/versions/node/v16.18.1/bin/node /home/salr/asdfondi/s$
Restart=on-failure

[Install]
WantedBy=multi-user.target

这是我所遵循的指南:https://nodesource.com/blog/running-your-node-js-app-with-systemd-part-1/

结果如下sudo systemctl status [service-name]

● asdfondi.service - asdfondi website
   Loaded: loaded (/lib/systemd/system/asdfondi.service; enabled; vendor preset:
   Active: inactive (dead) since Sun 2022-11-27 08:28:14 CET; 13min ago
     Docs: https://github.com/riccardi1997/asdfondi
 Main PID: 10360 (code=exited, status=0/SUCCESS)

Nov 27 08:28:13 asdfondicalci systemd[1]: Started asdfondi website.

我被封了,对我来说一切都很好。我错在哪里?

抱歉重复提问,但其他问题对我没有帮助。

相关内容