Commit 58db1a98 authored by Boxiang Sun's avatar Boxiang Sun

peertube: maybe we don't need to check the pg query?

parent 34b1948c
......@@ -54,4 +54,4 @@ md5sum = 58d1a4fe246169dea94d7d243b4bac9e
[template-peertube-restore-script]
filename = template-peertube-restore.sh.in
md5sum = dd4f5a5f862473efa2109315dbef3110
md5sum = 8e6091bc739f44801f52b004fac136d9
......@@ -63,17 +63,17 @@ echo "Ready to check postgresql is running..."
# initial db setup
# ( first quering PG several times waiting a bit till postgresql is started and ready )
tpgwait=5
while true; do
pgtables="$(psql -c '\d' 2>&1)" && break
tpgwait=$(( $tpgwait - 1 ))
test $tpgwait = 0 && die "pg query problem"
echo "I: PostgreSQL is not ready (yet ?); will retry $tpgwait times..." 1>&2
sleep 1
done
echo "I: PostgreSQL ready." 1>&2
sleep 5
# tpgwait=5
# while true; do
# pgtables="$(psql -c '\d' 2>&1)" && break
# tpgwait=$(( $tpgwait - 1 ))
# test $tpgwait = 0 && die "pg query problem"
# echo "I: PostgreSQL is not ready (yet ?); will retry $tpgwait times..." 1>&2
# sleep 1
# done
# echo "I: PostgreSQL ready." 1>&2
# sleep 5
# Check the postgresql is running, if postgresql has stopped, abort
pid_file=$${postgresql:pgdata-directory}/postmaster.pid
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment