revert: remove relay proxy helper
This commit is contained in:
parent
f3f5e21195
commit
b29f86af4e
21
start-dev.sh
Executable file → Normal file
21
start-dev.sh
Executable file → Normal file
@ -14,8 +14,6 @@ RELAY_DIR="${ROOT_DIR}/sdk_relay"
|
||||
RELAY_BIN="${RELAY_DIR}/target/release/sdk_relay"
|
||||
RELAY_PID_FILE="${LOG_DIR}/sdk_relay.pid"
|
||||
RELAY_LOG_FILE="${LOG_DIR}/sdk_relay.log"
|
||||
PROXY_PORT=3000
|
||||
PROXY_PID_FILE="${LOG_DIR}/sdk_relay.proxy.pid"
|
||||
|
||||
mkdir -p "${LOG_DIR}"
|
||||
|
||||
@ -91,16 +89,6 @@ start_relay() {
|
||||
echo "[start] sdk_relay PID $(cat "${RELAY_PID_FILE}")"
|
||||
}
|
||||
|
||||
start_proxy() {
|
||||
stop_proxy >/dev/null 2>&1 || true
|
||||
stop_port "${PROXY_PORT}" || true
|
||||
|
||||
echo "[start] Launching relay TCP proxy ${PROXY_PORT}->${RELAY_PORT}"
|
||||
socat TCP-LISTEN:${PROXY_PORT},reuseaddr,fork TCP:127.0.0.1:${RELAY_PORT} > "${LOG_DIR}/sdk_relay.proxy.log" 2>&1 &
|
||||
echo $! > "${PROXY_PID_FILE}"
|
||||
echo "[start] proxy PID $(cat "${PROXY_PID_FILE}")"
|
||||
}
|
||||
|
||||
stop_front() {
|
||||
stop_pid_file "${FRONT_PID_FILE}"
|
||||
stop_port "${FRONT_PORT}" || true
|
||||
@ -113,12 +101,6 @@ stop_relay() {
|
||||
echo "[stop] sdk_relay stopped"
|
||||
}
|
||||
|
||||
stop_proxy() {
|
||||
stop_pid_file "${PROXY_PID_FILE}"
|
||||
stop_port "${PROXY_PORT}" || true
|
||||
echo "[stop] relay proxy stopped"
|
||||
}
|
||||
|
||||
status_service() {
|
||||
local name="$1"
|
||||
local pid_file="$2"
|
||||
@ -148,12 +130,10 @@ command_all() {
|
||||
case "${action}" in
|
||||
start)
|
||||
start_relay
|
||||
start_proxy
|
||||
start_front
|
||||
;;
|
||||
stop)
|
||||
stop_front
|
||||
stop_proxy
|
||||
stop_relay
|
||||
;;
|
||||
restart)
|
||||
@ -162,7 +142,6 @@ command_all() {
|
||||
;;
|
||||
status)
|
||||
status_service "sdk_relay" "${RELAY_PID_FILE}" "${RELAY_PORT}"
|
||||
status_service "relay proxy" "${PROXY_PID_FILE}" "${PROXY_PORT}"
|
||||
status_service "ihm_client" "${FRONT_PID_FILE}" "${FRONT_PORT}"
|
||||
;;
|
||||
*)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user