EDDN/contrib/systemd/eddn@.service
Athanasius 415f5bb17d systemd: Change to a single script for starting services
* Pass the EDDN service to be started as $1.
* eddn_config now defines a python venv activate script to use.
* And this new central script uses that.
2021-06-14 15:22:58 +01:00

33 lines
910 B
Desktop File

# systemd service template for EDDN services. The actual instances will
# be called "eddn@<component>", 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/.local/bin/%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-service %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