# systemd service template for EDDN services. The actual instances will # be called "eddn@", e.g. "eddn@eddn-gateway". The # variable %i expands to "version-cluster", %I expands to "version/cluster". # (%I breaks for cluster names containing dashes.) # # NB: This is heavily cribbed from Debiab's PostgreSQL systemd service files. [Unit] Description=EDDN Service %i AssertPathExists=/home/eddn/live/python-venv/bin/eddn-%i PartOf=eddn.service ReloadPropagatedFrom=eddn.service Before=eddn.service # stop server before networking goes down on shutdown After=network.target [Service] Type=simple User=eddn Group=eddn ExecStart=/home/eddn/.local/bin/start-eddn-live-service live %i TimeoutStartSec=10s TimeoutStopSec=10s SyslogIdentifier=eddn@%i # prevent OOM killer from choosing the postmaster (individual backends will # reset the score to 0) #OOMScoreAdjust=-900 Restart=on-failure [Install] WantedBy=multi-user.target