File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed
Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ export FUNCTION_STREAM_LOG_DIR="${FUNCTION_STREAM_LOG_DIR:-$APP_HOME/logs}"
7474
7575BINARY=" $BIN_DIR /function-stream"
7676FOREGROUND=" true"
77- APP_ARGS=" "
77+ APP_ARGS=()
7878
7979if [ ! -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
119119echo " ------------------------------------------------"
120120
121121if [ " $FOREGROUND " = " true" ]; then
122- exec " $BINARY " --config " $FUNCTION_STREAM_CONF " $ APP_ARGS
122+ exec " $BINARY " --config " $FUNCTION_STREAM_CONF " " ${ APP_ARGS[@]} "
123123else
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
Original file line number Diff line number Diff line change @@ -20,10 +20,8 @@ ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
2020VENV_DIR=" $ROOT_DIR /.venv"
2121PYTHON_ROOT=" $ROOT_DIR /python"
2222
23- C_R=" \033[0;31m"
2423C_G=" \033[0;32m"
2524C_B=" \033[0;34m"
26- C_Y=" \033[0;33m"
2725C_0=" \033[0m"
2826
2927log_act () { printf " ${C_B} [-]${C_0} %s\n" " $1 " ; }
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ PIP="$VENV_BIN/pip"
2323PYTHON_BIN=" $VENV_BIN /python"
2424PYTHON_ROOT=" $ROOT_DIR /python"
2525
26- C_R=" \033[0;31m"
2726C_G=" \033[0;32m"
2827C_Y=" \033[0;33m"
2928C_B=" \033[0;34m"
You can’t perform that action at this time.
0 commit comments