summaryrefslogtreecommitdiffstats
path: root/package/postgresql/postgresql.service
diff options
context:
space:
mode:
Diffstat (limited to 'package/postgresql/postgresql.service')
-rw-r--r--package/postgresql/postgresql.service12
1 files changed, 8 insertions, 4 deletions
diff --git a/package/postgresql/postgresql.service b/package/postgresql/postgresql.service
index 4a96258684..53e6f84f00 100644
--- a/package/postgresql/postgresql.service
+++ b/package/postgresql/postgresql.service
@@ -3,7 +3,7 @@ Description=PostgreSQL database server
After=network.target
[Service]
-Type=forking
+Type=notify
# start timeout disabled because initdb may run a little
# longer (eg. 5 minutes on RaspberryPi)
@@ -12,13 +12,17 @@ TimeoutStartSec=0
User=postgres
Group=postgres
+StandardOutput=syslog
+StandardError=syslog
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
+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
OpenPOWER on IntegriCloud