fix: enforce joint service lifecycle
**Motivations :** - avoid partial start/stop scenarios between lui and relay **Modifications :** - simplify start-dev.sh interface to always operate on both services simultaneously **Page affectées :** - start-dev.sh
This commit is contained in:
parent
ff94b1ec21
commit
8ec8df419e
33
start-dev.sh
33
start-dev.sh
@ -151,38 +151,11 @@ command_all() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$#" -lt 1 ]; then
|
if [ "$#" -ne 1 ]; then
|
||||||
echo "Usage: $0 {start|stop|restart|status} [front|relay|all]" >&2
|
echo "Usage: $0 {start|stop|restart|status}" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ACTION="$1"
|
ACTION="$1"
|
||||||
TARGET="${2:-all}"
|
|
||||||
|
|
||||||
case "${TARGET}" in
|
command_all "${ACTION}"
|
||||||
front)
|
|
||||||
case "${ACTION}" in
|
|
||||||
start) start_front ;;
|
|
||||||
stop) stop_front ;;
|
|
||||||
restart) stop_front; start_front ;;
|
|
||||||
status) status_service "ihm_client" "${FRONT_PID_FILE}" "${FRONT_PORT}" ;;
|
|
||||||
*) echo "Unknown action: ${ACTION}" >&2; exit 1 ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
relay)
|
|
||||||
case "${ACTION}" in
|
|
||||||
start) start_relay ;;
|
|
||||||
stop) stop_relay ;;
|
|
||||||
restart) stop_relay; start_relay ;;
|
|
||||||
status) status_service "sdk_relay" "${RELAY_PID_FILE}" "${RELAY_PORT}" ;;
|
|
||||||
*) echo "Unknown action: ${ACTION}" >&2; exit 1 ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
all)
|
|
||||||
command_all "${ACTION}"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown target: ${TARGET}" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
Loading…
x
Reference in New Issue
Block a user