Exemple de fichier service pour systemd

[Unit]
Description=description du service
Documentation=URL vers la documentation
#Default case
After=network.target
# case when PostgreSQL is on localhost
# After=network.target postgresql.service
# Requires=postgresql.service
[Service]
User=librephotos
Group=librephotos
EnvironmentFile=/etc/librephotos/librephotos-backend.env
ExecStart=/usr/lib/librephotos/bin/librephotos-backend
WorkingDirectory=/usr/lib/librephotos/backend
Restart=on-failure
RestartSec=60
[Install]
WantedBy=multi-user.target

source : https://www.freedesktop.org/software/systemd/man/systemd.service.html