Commit d99432e9 authored by Boxiang Sun's avatar Boxiang Sun

peertube: test fixup

parent 5404275e
Pipeline #25162 passed with stage
in 0 seconds
......@@ -54,4 +54,4 @@ md5sum = e50daa16a2c1866997933981bed45271
[template-peertube-restore-script]
filename = template-peertube-restore.sh.in
md5sum = c879ced2a42b22cff7409432e4c9dde8
md5sum = 8867a9566d748d9c54f9a862fa89d69a
......@@ -42,12 +42,7 @@ echo "Starting postgresql..."
$${postgresql:bin}/postgres -D $${postgresql:pgdata-directory} &
postgresql_pid=$!
trap "kill $postgresql_pid" EXIT TERM INT
sleep 30
# If postgres has stopped, abort
if ! [ -d /proc/$postgresql_pid ]; then
echo "postgresql exited, aborting."
exit 1
fi
tpgwait=60
while ! [ -e "$pid_file" ]; do
......@@ -57,6 +52,12 @@ while ! [ -e "$pid_file" ]; do
sleep 1
done
# If postgres has stopped, abort
if ! [ -d /proc/$postgresql_pid ]; then
echo "postgresql exited, aborting."
exit 1
fi
# run psql
psql() {
$${postgresql:bin}/psql \
......@@ -74,6 +75,7 @@ tpgwait=60
while true; do
pgtables="$(psql -c '\d' 2>&1)"
ls $${postgresql:pgdata-directory}
echo $${postgresql:pgdata-directory}
echo $pgtables
pgtables="$(psql -c '\d' 2>&1)" && break
tpgwait=$(( $tpgwait - 1 ))
......
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