open-plc-utils: new package
[buildroot-gz.git] / package / postgresql / postgresql.service
blob4a962586849039912a20cb9f063a3db644bee158
1 [Unit]
2 Description=PostgreSQL database server
3 After=network.target
5 [Service]
6 Type=forking
8 # start timeout disabled because initdb may run a little
9 # longer (eg. 5 minutes on RaspberryPi)
10 TimeoutStartSec=0
12 User=postgres
13 Group=postgres
15 SyslogIdentifier=postgres
16 PIDFile=/var/lib/pgsql/postmaster.pid
18 ExecStartPre=/bin/sh -c "if [ ! -f /var/lib/pgsql/PG_VERSION ]; then /usr/bin/pg_ctl initdb -D /var/lib/pgsql; fi"
19 ExecStart=/usr/bin/pg_ctl start -D /var/lib/pgsql -w -l /var/lib/pgsql/logfile
20 ExecReload=/usr/bin/pg_ctl reload -D /var/lib/pgsql
21 ExecStop=/usr/bin/pg_ctl stop -D /var/lib/pgsql -m fast
23 [Install]
24 WantedBy=multi-user.target