fix: let postgresql handle its pidfile
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
d72d52401e
commit
9ee7d3659b
3 changed files with 2 additions and 5 deletions
|
@ -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"
|
start program = "/usr/local/bin/postgresqld start"
|
||||||
stop program = "/usr/local/bin/postgresqld stop"
|
stop program = "/usr/local/bin/postgresqld stop"
|
||||||
if failed port 5432 protocol pgsql for 3 times within 5 cycles then restart
|
if failed port 5432 protocol pgsql for 3 times within 5 cycles then restart
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
listen_addresses = '*'
|
listen_addresses = '*'
|
||||||
external_pid_file = '/run/postgresql.pid'
|
external_pid_file = '/run/postgresql/pid'
|
||||||
log_destination = 'syslog'
|
log_destination = 'syslog'
|
||||||
log_checkpoints = on
|
log_checkpoints = on
|
||||||
log_connections = on
|
log_connections = on
|
||||||
|
|
|
@ -9,8 +9,6 @@ case $1 in
|
||||||
reload)
|
reload)
|
||||||
su ${user} -c "pg_ctl reload -D ${PGDATA}" ;;
|
su ${user} -c "pg_ctl reload -D ${PGDATA}" ;;
|
||||||
*)
|
*)
|
||||||
pid=/run/postgresql.pid
|
|
||||||
|
|
||||||
install -dm 2750 -o ${user} -g ${user} /run/postgresql
|
install -dm 2750 -o ${user} -g ${user} /run/postgresql
|
||||||
chown -R ${user}:${user} ${PGBASE}
|
chown -R ${user}:${user} ${PGBASE}
|
||||||
|
|
||||||
|
@ -20,7 +18,6 @@ case $1 in
|
||||||
echo "include_dir = '/etc/postgres.d'" >> ${PGDATA}/postgresql.conf
|
echo "include_dir = '/etc/postgres.d'" >> ${PGDATA}/postgresql.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f ${pid}
|
|
||||||
daemonize -u ${user} -c ${PGDATA} /usr/bin/postgres
|
daemonize -u ${user} -c ${PGDATA} /usr/bin/postgres
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue