Took out verbose of service not installed on start and stop scripts
This commit is contained in:
parent
49e4c23b1f
commit
a6cb606892
@ -63,7 +63,7 @@ startservice() {
|
|||||||
startservice_all() {
|
startservice_all() {
|
||||||
for SERVICE in "${SERVICES[@]}"; do
|
for SERVICE in "${SERVICES[@]}"; do
|
||||||
# If app isn't installed then skip
|
# If app isn't installed then skip
|
||||||
[ ! -d "/federated/apps/$SERVICE" ] && echo "* $SERVICE not installed, skipping." && continue
|
[ ! -d "/federated/apps/$SERVICE" ] && continue
|
||||||
|
|
||||||
FAILED="no"
|
FAILED="no"
|
||||||
if [ "$SERVICE" = "jitsi" ]; then
|
if [ "$SERVICE" = "jitsi" ]; then
|
||||||
@ -127,14 +127,14 @@ elif [ "$SERVICE" = "all" ]; then
|
|||||||
# Starting all apps
|
# Starting all apps
|
||||||
# First start the CORE_APPS one by one
|
# First start the CORE_APPS one by one
|
||||||
for i in "${CORE_APPS[@]}"; do
|
for i in "${CORE_APPS[@]}"; do
|
||||||
[ ! -d "/federated/apps/$i" ] && echo "* $i not installed, skipping." && continue
|
[ ! -d "/federated/apps/$i" ] && continue
|
||||||
[ "$(docker container inspect -f '{{.State.Status}}' $i 2>/dev/null)" = "running" ] && echo "* $i is already started." && continue
|
[ "$(docker container inspect -f '{{.State.Status}}' $i 2>/dev/null)" = "running" ] && echo "* $i is already started." && continue
|
||||||
startservice_coreapp "$i"
|
startservice_coreapp "$i"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Next start EXTRA_APPS in parallel
|
# Next start EXTRA_APPS in parallel
|
||||||
for i in "${EXTRA_APPS[@]}"; do
|
for i in "${EXTRA_APPS[@]}"; do
|
||||||
[ ! -d "/federated/apps/$i" ] && echo "* $i not installed, skipping." && continue
|
[ ! -d "/federated/apps/$i" ] && continue
|
||||||
[ "$(docker container inspect -f '{{.State.Status}}' $i 2>/dev/null)" = "running" ] && echo "* $i is already started." && continue
|
[ "$(docker container inspect -f '{{.State.Status}}' $i 2>/dev/null)" = "running" ] && echo "* $i is already started." && continue
|
||||||
[ "$i" = "jitsi" ] && [ "$(docker container inspect -f '{{.State.Status}}' jitsi_web_1 2>/dev/null)" = "running" ] && echo "* $i is already started." && continue
|
[ "$i" = "jitsi" ] && [ "$(docker container inspect -f '{{.State.Status}}' jitsi_web_1 2>/dev/null)" = "running" ] && echo "* $i is already started." && continue
|
||||||
startservice_all_new "$i" &
|
startservice_all_new "$i" &
|
||||||
|
4
bin/stop
4
bin/stop
@ -23,7 +23,7 @@ stopservice() {
|
|||||||
stopservice_all_old() {
|
stopservice_all_old() {
|
||||||
for i in "${SERVICES[@]}"; do
|
for i in "${SERVICES[@]}"; do
|
||||||
# If app isn't installed then skip
|
# If app isn't installed then skip
|
||||||
[ ! -d "/federated/apps/$i" ] && echo "* $i not installed, skipping." && continue
|
[ ! -d "/federated/apps/$i" ] && continue
|
||||||
|
|
||||||
echo "* Stopping $i.."
|
echo "* Stopping $i.."
|
||||||
cd /federated/apps/$i && docker-compose -f docker-compose.yml -p $i down
|
cd /federated/apps/$i && docker-compose -f docker-compose.yml -p $i down
|
||||||
@ -41,7 +41,7 @@ SERVICE=$1
|
|||||||
if [ "$SERVICE" = "all" ]; then
|
if [ "$SERVICE" = "all" ]; then
|
||||||
for i in "${SERVICES[@]}"; do
|
for i in "${SERVICES[@]}"; do
|
||||||
# If app isn't installed then skip
|
# If app isn't installed then skip
|
||||||
[ ! -d "/federated/apps/$i" ] && echo "* $i not installed, skipping." && continue
|
[ ! -d "/federated/apps/$i" ] && continue
|
||||||
|
|
||||||
# If app is already stopped then skip
|
# If app is already stopped then skip
|
||||||
[ ! "$(docker ps -f "name=$i" -f "status=running" -q)" ] && echo "* $i is already stopped." && continue
|
[ ! "$(docker ps -f "name=$i" -f "status=running" -q)" ] && echo "* $i is already stopped." && continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user