systemd services

systemd starts and supervises services. A unit file describes how a service runs.

[Unit]
Description=My app
[Service]
ExecStart=/usr/local/bin/myapp
Restart=on-failure
[Install]
WantedBy=multi-user.target

Reload with systemctl daemon-reload and read logs with journalctl -u myapp.

← All lessons