You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
775 B
26 lines
775 B
[Unit]
|
|
Description=PostgreSQL Database Server - Set major version
|
|
Documentation=https://hub.docker.com/_/postgres/
|
|
Before=postgresql-update.service postgresql-server.service
|
|
|
|
# Only start if PostgreSQL has been configured
|
|
ConditionPathExists=/etc/quadlets/postgresql/config.env
|
|
|
|
# Start/stop this unit when the target is started/stopped
|
|
PartOf=postgresql.target
|
|
|
|
[Service]
|
|
Restart=no
|
|
TimeoutStartSec=30
|
|
|
|
# These environment variables are sourced to be used by systemd in the Exec* commands
|
|
EnvironmentFile=/etc/quadlets/postgresql/config.env
|
|
|
|
# Set the "latest" symlink to point to the desired major version
|
|
ExecStart=ln -sfT ${PG_MAJOR} /var/lib/quadlets/postgresql/latest
|
|
|
|
# This service is a job - run once to completion
|
|
Type=oneshot
|
|
|
|
[Install]
|
|
WantedBy=postgresql.target
|
|
|