2014-05-20 23:16:51 +02:00
|
|
|
[Unit]
|
|
|
|
Description=PostgreSQL database server
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
2019-02-04 19:53:40 +01:00
|
|
|
Type=notify
|
2014-05-20 23:16:51 +02:00
|
|
|
|
|
|
|
# start timeout disabled because initdb may run a little
|
|
|
|
# longer (eg. 5 minutes on RaspberryPi)
|
|
|
|
TimeoutStartSec=0
|
|
|
|
|
|
|
|
User=postgres
|
|
|
|
Group=postgres
|
|
|
|
|
2019-02-04 19:53:40 +01:00
|
|
|
StandardOutput=syslog
|
|
|
|
StandardError=syslog
|
2014-05-20 23:16:51 +02:00
|
|
|
SyslogIdentifier=postgres
|
|
|
|
PIDFile=/var/lib/pgsql/postmaster.pid
|
|
|
|
|
|
|
|
ExecStartPre=/bin/sh -c "if [ ! -f /var/lib/pgsql/PG_VERSION ]; then /usr/bin/pg_ctl initdb -D /var/lib/pgsql; fi"
|
2019-02-04 19:53:40 +01:00
|
|
|
ExecStart=/usr/bin/postgres -D /var/lib/pgsql
|
|
|
|
ExecReload=/usr/bin/kill -HUP $MAINPID
|
|
|
|
KillMode=mixed
|
|
|
|
KillSignal=SIGINT
|
|
|
|
TimeoutSec=0
|
2014-05-20 23:16:51 +02:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|