我在Raspbian /Linux 11 (bullseye)上运行我的代码raspberry pi 4。
我想通过systemd启动我的uwsgi服务器。我的.ini文件:
http = :5000
processes = 4
threads = 2
wsgi-file = /home/pi/Python/uwsgi_examples/hello_flask.py
callable = app该应用程序是一个简单的烧瓶应用程序。我的my_service.service文件:
[Unit]
Description=uwsgi Service
After=network.target
After=network-online.target
[Service]
ExecStart=/home/pi/.local/bin/uwsgi --ini /home/pi/Python/uwsgi_examples/flask.ini
Restart=always
KillSignal=SIGQUIT
[Install]
WantedBy=multi.user.target当我跑步时:
sudo systenctl start my_service.service所有工作正常,但在重新启动后,服务器没有运行。(我启用了服务)当我运行时:
sudo systemctl status my_service我得到以下反馈:
my_service.service - uwsgi Service
Loaded: loaded (/etc/systemd/system/my_service.service; enabled; vendor pr>
Active: inactive (dead)有什么建议吗?
发布于 2022-09-04 21:59:17
我终于发现了我的错误。我在.sevice文件中输入了一个错误。校正后
[Install]
WantedBy=multi.user.target至
[Install]
WantedBy=multi-user.target服务器在重新启动时启动。
https://stackoverflow.com/questions/73602412
复制相似问题