Skip to content
James Callaghan edited this page May 20, 2020 · 1 revision

Service

Service

# more /etc/systemd/system/name.service
[Unit]
Description=add description
After=network.target
[Service]
ExecStart=path/to/project.py
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target

Create service

sudo cp name.service /etc/systemd/system
sudo systemctl enable name.service
sudo systemctl start name.service

Check service status

systemctl status name.service
Clone this wiki locally