![Peter Seiderer](/assets/img/avatar_default.png)
[Thomas: indent using tabs.] Signed-off-by: Peter Seiderer <ps.report@gmx.net> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
25 lines
643 B
Desktop File
25 lines
643 B
Desktop File
[Unit]
|
|
Description=PostgreSQL database server
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=forking
|
|
|
|
# start timeout disabled because initdb may run a little
|
|
# longer (eg. 5 minutes on RaspberryPi)
|
|
TimeoutStartSec=0
|
|
|
|
User=postgres
|
|
Group=postgres
|
|
|
|
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"
|
|
ExecStart=/usr/bin/pg_ctl start -D /var/lib/pgsql -w -l /var/lib/pgsql/logfile
|
|
ExecReload=/usr/bin/pg_ctl reload -D /var/lib/pgsql
|
|
ExecStop=/usr/bin/pg_ctl stop -D /var/lib/pgsql -m fast
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|