728x90 systemctl1 리눅스 - 서비스 생성(systemctl) 서비스 생성 nano /etc/systemd/system/my_service.service [Unit] Description=My Service After=network.target [Service] ExecStart=/usr/bin/python3 /path/to/app.py WorkingDirectory=/path/to/app/directory Restart=always User=my_user [Install] WantedBy=multi-user.target [Unit] : 서비스의 이름과 실행 순서 등의 정보를 정의합니다. [Service] : 서비스 실행 시 필요한 정보를 정의합니다. ExecStart : 서비스를 시작할 명령어를 지정합니다. WorkingDirectory : 서비스를 시작할 때 실.. 2023. 5. 9. 이전 1 다음 728x90