fix: let postgresql handle its pidfile
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
f 2023-02-04 19:37:00 -03:00
parent d72d52401e
commit 9ee7d3659b
3 changed files with 2 additions and 5 deletions

View file

@ -1,4 +1,4 @@
check process postgresql with pidfile /run/postgresql.pid
check process postgresql with pidfile /run/postgresql/pid
start program = "/usr/local/bin/postgresqld start"
stop program = "/usr/local/bin/postgresqld stop"
if failed port 5432 protocol pgsql for 3 times within 5 cycles then restart

View file

@ -1,5 +1,5 @@
listen_addresses = '*'
external_pid_file = '/run/postgresql.pid'
external_pid_file = '/run/postgresql/pid'
log_destination = 'syslog'
log_checkpoints = on
log_connections = on

View file

@ -9,8 +9,6 @@ case $1 in
reload)
su ${user} -c "pg_ctl reload -D ${PGDATA}" ;;
*)
pid=/run/postgresql.pid
install -dm 2750 -o ${user} -g ${user} /run/postgresql
chown -R ${user}:${user} ${PGBASE}
@ -20,7 +18,6 @@ case $1 in
echo "include_dir = '/etc/postgres.d'" >> ${PGDATA}/postgresql.conf
fi
rm -f ${pid}
daemonize -u ${user} -c ${PGDATA} /usr/bin/postgres
;;
esac