Update 'start.sh'
This commit is contained in:
parent
7c1837c750
commit
7f4bb91d36
13
start.sh
13
start.sh
@ -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"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user