From 7f4bb91d3636fed9633a48e25e650feda7327371 Mon Sep 17 00:00:00 2001 From: verita84 Date: Fri, 31 Mar 2023 14:19:32 +0000 Subject: [PATCH] Update 'start.sh' --- start.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 718dbfd..3d4b12b 100644 --- a/start.sh +++ b/start.sh @@ -2,6 +2,17 @@ export SHELL="/bin/bash" FILE='/configured.txt' +postgres-check() { + POSTGRES_CHECK=$(ps aux | grep -i logical | head -1) + if [[ "$POSTGRES_CHECK" = *"replication"* ]]; then + echo "Postgres is running!" + else + echo "Postgres is not in Running yet!" + sleep 2 + postgres-check + fi +} + # Start the instance to verify that everything is working as expected #Set Permissions @@ -28,6 +39,6 @@ nginx #Start Akkoma su postgres -s $SHELL -lc "$PG_BIN/pg_ctl start -D $PG_DIR"& -sleep 60 +postgres-check su akkoma -s $SHELL -lc "/opt/akkoma/bin/pleroma start"