svchelper/app/bin/init
2024-04-23 04:34:16 +02:00

29 lines
474 B
Bash

#!/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