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

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

parent 34b1948c
Pipeline #25028 passed with stage
in 0 seconds
...@@ -54,4 +54,4 @@ md5sum = 58d1a4fe246169dea94d7d243b4bac9e ...@@ -54,4 +54,4 @@ md5sum = 58d1a4fe246169dea94d7d243b4bac9e
[template-peertube-restore-script] [template-peertube-restore-script]
filename = template-peertube-restore.sh.in filename = template-peertube-restore.sh.in
md5sum = dd4f5a5f862473efa2109315dbef3110 md5sum = 8e6091bc739f44801f52b004fac136d9
...@@ -63,17 +63,17 @@ echo "Ready to check postgresql is running..." ...@@ -63,17 +63,17 @@ echo "Ready to check postgresql is running..."
# initial db setup # initial db setup
# ( first quering PG several times waiting a bit till postgresql is started and ready ) # ( first quering PG several times waiting a bit till postgresql is started and ready )
tpgwait=5 # tpgwait=5
while true; do # while true; do
pgtables="$(psql -c '\d' 2>&1)" && break # pgtables="$(psql -c '\d' 2>&1)" && break
tpgwait=$(( $tpgwait - 1 )) # tpgwait=$(( $tpgwait - 1 ))
test $tpgwait = 0 && die "pg query problem" # test $tpgwait = 0 && die "pg query problem"
echo "I: PostgreSQL is not ready (yet ?); will retry $tpgwait times..." 1>&2 # echo "I: PostgreSQL is not ready (yet ?); will retry $tpgwait times..." 1>&2
sleep 1 # sleep 1
done # done
echo "I: PostgreSQL ready." 1>&2 # echo "I: PostgreSQL ready." 1>&2
sleep 5 # sleep 5
# Check the postgresql is running, if postgresql has stopped, abort # Check the postgresql is running, if postgresql has stopped, abort
pid_file=$${postgresql:pgdata-directory}/postmaster.pid 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