Skip to content

Commit 4cde2e1

Browse files
committed
update
1 parent 616e58c commit 4cde2e1

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

bin/start-server.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export FUNCTION_STREAM_LOG_DIR="${FUNCTION_STREAM_LOG_DIR:-$APP_HOME/logs}"
7474

7575
BINARY="$BIN_DIR/function-stream"
7676
FOREGROUND="true"
77-
APP_ARGS=""
77+
APP_ARGS=()
7878

7979
if [ ! -f "$BINARY" ]; then
8080
echo "[ERROR] Binary not found at $BINARY"
@@ -97,11 +97,11 @@ while [ $# -gt 0 ]; do
9797
;;
9898
--)
9999
shift
100-
APP_ARGS="$APP_ARGS $*"
100+
APP_ARGS+=("$@")
101101
break
102102
;;
103103
*)
104-
APP_ARGS="$APP_ARGS $1"
104+
APP_ARGS+=("$1")
105105
shift
106106
;;
107107
esac
@@ -119,12 +119,12 @@ echo "Mode: $( [ "$FOREGROUND" = "true" ] && echo "Foreground" || echo "Daemon
119119
echo "------------------------------------------------"
120120

121121
if [ "$FOREGROUND" = "true" ]; then
122-
exec "$BINARY" --config "$FUNCTION_STREAM_CONF" $APP_ARGS
122+
exec "$BINARY" --config "$FUNCTION_STREAM_CONF" "${APP_ARGS[@]}"
123123
else
124124
LOG_OUT="$FUNCTION_STREAM_LOG_DIR/stdout.log"
125125
LOG_ERR="$FUNCTION_STREAM_LOG_DIR/stderr.log"
126126

127-
nohup "$BINARY" --config "$FUNCTION_STREAM_CONF" $APP_ARGS > "$LOG_OUT" 2> "$LOG_ERR" &
127+
nohup "$BINARY" --config "$FUNCTION_STREAM_CONF" "${APP_ARGS[@]}" > "$LOG_OUT" 2> "$LOG_ERR" &
128128
PID=$!
129129

130130
sleep 1

scripts/clean.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
2020
VENV_DIR="$ROOT_DIR/.venv"
2121
PYTHON_ROOT="$ROOT_DIR/python"
2222

23-
C_R="\033[0;31m"
2423
C_G="\033[0;32m"
2524
C_B="\033[0;34m"
26-
C_Y="\033[0;33m"
2725
C_0="\033[0m"
2826

2927
log_act() { printf "${C_B} [-]${C_0} %s\n" "$1"; }

scripts/setup.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ PIP="$VENV_BIN/pip"
2323
PYTHON_BIN="$VENV_BIN/python"
2424
PYTHON_ROOT="$ROOT_DIR/python"
2525

26-
C_R="\033[0;31m"
2726
C_G="\033[0;32m"
2827
C_Y="\033[0;33m"
2928
C_B="\033[0;34m"

0 commit comments

Comments
 (0)