내 플라스크 애플리케이션을 위한 시스템 서비스를 만들려고 합니다. 이것은 내 서비스 응용 프로그램입니다
comission_project.service
[Unit]
Description=uWSGI instance to server comission project
Requires = network.target
After=network.target
[Service]
ExecStart=/home/schirag/comission_project/venv/bin/python3" "/home/schirag/Desktop/comission_project/Hello.py
WorkingDirectory=/home/schirag/Desktop/comission_project
User=schirag
Environment="PATH=/home/schirag/Desktop/comission_project/venv"
[Install]
WantedBy=multi-user.target
서비스를 시작하고 활성화하면 다음과 같은 상태가 표시됩니다.
comission_project.service - uWSGI instance to server comission project
Loaded: loaded (/etc/systemd/system/comission_project.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2021-08-13 12:50:18 IST; 30min ago
Main PID: 22192 (code=exited, status=203/EXEC)
Aug 13 12:50:18 localhost.localdomain systemd[1]: Started uWSGI instance to server comission project.
Aug 13 12:50:18 localhost.localdomain systemd[1]: comission_project.service: Main process exited, code=exited, status=203/EXEC
Aug 13 12:50:18 localhost.localdomain systemd[1]: comission_project.service: Failed with result 'exit-code
명령어를 입력하면 이런 모습이 됩니다.journalctl -u comission_project
Aug 13 12:50:18 localhost.localdomain systemd[1]: Started uWSGI instance to server comission project.
Aug 13 12:50:18 localhost.localdomain systemd[1]: comission_project.service: Main process exited, code=exited, status=203/EXEC
Aug 13 12:50:18 localhost.localdomain systemd[1]: comission_project.service: Failed with result 'exit-code'.
서비스를 시작하기 위해 수행해야 할 작업