GG
Size: a a a
GG
GG
SK
SK
GG
SK
GG
SK
AS
#!/bin/bash
# SIGTERM-handler this funciton will be executed when the container receives the SIGTERM signal (when stopping)
term_handler(){
echo "***Stopping"
/usr/pgsql-11/bin/pg_ctl stop -m fast -D /var/lib/pgsql/11/data
exit 0
}
# Setup signal handlers
trap 'term_handler' SIGTERM
echo "***Starting"
/usr/pgsql-11/bin/postmaster -D /var/lib/pgsql/11/data
# Running something in foreground, otherwise the container will stop
while true
do
#sleep 1000 - Doesn't work with sleep. Not sure why.
tail -f /dev/null & wait ${!}
done
/usr/pgsql-11/bin/pg_ctl stop -m fast -D /var/lib/pgsql/11/data
postgres | ***Stopping
postgres | pg_ctl: PID file "/var/lib/pgsql/11/data/postmaster.pid" does not exist
postgres | Is server running?
А
CN
A
CN
CN
A
АФ
#!/bin/bash
# SIGTERM-handler this funciton will be executed when the container receives the SIGTERM signal (when stopping)
term_handler(){
echo "***Stopping"
/usr/pgsql-11/bin/pg_ctl stop -m fast -D /var/lib/pgsql/11/data
exit 0
}
# Setup signal handlers
trap 'term_handler' SIGTERM
echo "***Starting"
/usr/pgsql-11/bin/postmaster -D /var/lib/pgsql/11/data
# Running something in foreground, otherwise the container will stop
while true
do
#sleep 1000 - Doesn't work with sleep. Not sure why.
tail -f /dev/null & wait ${!}
done
/usr/pgsql-11/bin/pg_ctl stop -m fast -D /var/lib/pgsql/11/data
postgres | ***Stopping
postgres | pg_ctl: PID file "/var/lib/pgsql/11/data/postmaster.pid" does not exist
postgres | Is server running?
A
AS
АФ