f2d90b38 commited on
Commit
260d193
·
verified ·
1 Parent(s): 0557d09

Upload 4 files

Browse files
Files changed (1) hide show
  1. start.sh +13 -8
start.sh CHANGED
@@ -87,15 +87,20 @@ detect_cmd() {
87
  return 1
88
  }
89
 
90
- CLI_CMD="$(detect_cmd || true)"
91
- if [ -z "${CLI_CMD}" ]; then
92
- echo "Cannot detect how to start CLIProxyAPI."
93
- echo "Set CLI_PROXY_CMD in Space Variables to the correct launch command."
94
- exit 1
95
- fi
 
 
 
 
96
 
97
- echo "Starting CLIProxyAPI: ${CLI_CMD}"
98
- sh -c "${CLI_CMD}" &
 
99
 
100
  echo "Starting nginx on port ${PORT}, proxy path ${PROXY_PATH}"
101
  exec nginx -g 'daemon off;'
 
87
  return 1
88
  }
89
 
90
+ if [ "$#" -gt 0 ]; then
91
+ echo "Starting CLIProxyAPI from base CMD: $*"
92
+ "$@" &
93
+ else
94
+ CLI_CMD="$(detect_cmd || true)"
95
+ if [ -z "${CLI_CMD}" ]; then
96
+ echo "Cannot detect how to start CLIProxyAPI."
97
+ echo "Set CLI_PROXY_CMD in Space Variables to the correct launch command."
98
+ exit 1
99
+ fi
100
 
101
+ echo "Starting CLIProxyAPI: ${CLI_CMD}"
102
+ sh -c "${CLI_CMD}" &
103
+ fi
104
 
105
  echo "Starting nginx on port ${PORT}, proxy path ${PROXY_PATH}"
106
  exec nginx -g 'daemon off;'