svchelper/app/bin/init

29 lines
474 B
Plaintext
Raw Normal View History

2024-04-23 02:34:16 +00:00
#!/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