#!/usr/bin/env bash set +e echo "$APP_NAME service: $1" if [ "$1" = "start" ]; then "$APP" list | while read -r SERVICE; do "$APP" start "$SERVICE" done exit 0 fi if [ "$1" = "stop" ]; then "$APP" list | while read -r SERVICE; do "$APP" stop "$SERVICE" done exit 0 fi if [ "$1" = "restart" ]; then "$APP" list | while read -r SERVICE; do "$APP" stop "$SERVICE" done "$APP" list | while read -r SERVICE; do "$APP" start "$SERVICE" done exit 0 fi exit 1