29 lines
474 B
Plaintext
29 lines
474 B
Plaintext
|
#!/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
|