Update 'start.sh'

This commit is contained in:
verita84 2023-03-31 14:19:32 +00:00
parent 7c1837c750
commit 7f4bb91d36

View File

@ -2,6 +2,17 @@
export SHELL="/bin/bash" export SHELL="/bin/bash"
FILE='/configured.txt' 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 # Start the instance to verify that everything is working as expected
#Set Permissions #Set Permissions
@ -28,6 +39,6 @@ nginx
#Start Akkoma #Start Akkoma
su postgres -s $SHELL -lc "$PG_BIN/pg_ctl start -D $PG_DIR"& 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" su akkoma -s $SHELL -lc "/opt/akkoma/bin/pleroma start"