Fixed .env file

This commit is contained in:
root 2023-06-28 17:40:29 +00:00
parent 4953c508a4
commit 618d9f64a1
2 changed files with 30 additions and 5 deletions

View File

@ -10,6 +10,12 @@ COUNTRY="US"
# Where to send welcome e-mail
EMAIL="derek@federated.computer"
# Admin password
ADMINPASS="password123"
# Listmonk password
LISTMONKPASS="password123"
# Backblaze KeyID (Master Key) for backups
B2_APPLICATION_KEY_ID="3239c6765fdc"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -x
#
# Federated Start Script
. /federated/lib/functions.sh
@ -19,6 +19,7 @@ startservice() {
cd /federated/apps/$SERVICE && docker-compose -f docker-compose.yml -p $SERVICE up -d &> /dev/null
echo -ne "done.\n"
else
if [ "$SERVICE" = "jitsi" ]; then
spin &
SPINPID=$!
@ -32,9 +33,27 @@ startservice() {
fi
}
startservice_all() {
for i in "${SERVICES[@]}"; do
echo "* Starting $i.."
cd /federated/apps/$i && docker-compose -f docker-compose.yml -p $i up -d
. /federated/bin/.env
for SERVICE in "${SERVICES[@]}"; do
echo -ne "* Starting $SERVICE.."
if [ "$(docker container inspect -f '{{.State.Status}}' $SERVICE 2>/dev/null)" = "running" ]; then
echo -ne "is already running.\n"
else
if [ -z "$ALERTS_EMAIL" ]; then
cd /federated/apps/$SERVICE && docker-compose -f docker-compose.yml -p $SERVICE up -d &> /dev/null
echo -ne "done.\n"
else
spin &
SPINPID=$!
NC_COMMAND=`grep start_service /federated/lib/$SERVICE.sh | awk -F\" '{ print $4 }'`
RETRY=`grep start_service /federated/lib/caddy.sh | awk -F\" '{ print $6 }'`
start_service_withalert "$SERVICE" "$NC_COMMAND" "$RETRY"
kill -9 $SPINPID &> /dev/null
echo -ne "done.\n"
fi
fi
done
}