![Michael Nosthoff](/assets/img/avatar_default.png)
commit eada187e77
changed the service to Type=notify.
notify units don't need a PIDFile so this can be removed.
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
28 lines
591 B
Desktop File
28 lines
591 B
Desktop File
[Unit]
|
|
Description=PostgreSQL database server
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
|
|
# start timeout disabled because initdb may run a little
|
|
# longer (eg. 5 minutes on RaspberryPi)
|
|
TimeoutStartSec=0
|
|
|
|
User=postgres
|
|
Group=postgres
|
|
|
|
StandardOutput=syslog
|
|
StandardError=syslog
|
|
SyslogIdentifier=postgres
|
|
|
|
ExecStartPre=/bin/sh -c "if [ ! -f /var/lib/pgsql/PG_VERSION ]; then /usr/bin/pg_ctl initdb -D /var/lib/pgsql; fi"
|
|
ExecStart=/usr/bin/postgres -D /var/lib/pgsql
|
|
ExecReload=/usr/bin/kill -HUP $MAINPID
|
|
KillMode=mixed
|
|
KillSignal=SIGINT
|
|
TimeoutSec=0
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|