当我运行“sudo systemctl Gunicorn status”时,它向我显示:
Loaded: loaded (/etc/systemd/system/gunicorn.service; disabled; vendor preset: enabled)
Active: active (running) since Sun 2022-02-06 11:55:05 EET; 23min ago
我不明白为什么它被禁用。
这是我的gunicorn.service :
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
User=arh
Group=www-data
WorkingDirectory=/home/arh/toy-model/server
ExecStart=/home/arh/toy-model/venv/bin/gunicorn --workers 3 --bind unix:/home/arh/toy-model/server/server.sock server.wsgi:application
[Install]
WantedBy=multi-user.target
启用gunicorn可以解决问题
sudo systemctl enable gunicorn
答案归功于@khalilios