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"