mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
28
package/postgresql/postgresql.service
Normal file
28
package/postgresql/postgresql.service
Normal file
@@ -0,0 +1,28 @@
|
||||
[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
|
||||
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/postgres -D /var/lib/pgsql
|
||||
ExecReload=/usr/bin/kill -HUP $MAINPID
|
||||
KillMode=mixed
|
||||
KillSignal=SIGINT
|
||||
TimeoutSec=0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user