Open BishiBosS96 opened 4 years ago
I think wait
takes a pid these days. instead of -n
try $!
. Presuming node didn't spawn any child processes, that should be the pid of the last command you ran. If it does start child processes, you can use a clever grep
through ps
, like:
PID=$(ps aux | grep "<something that identifies your process(es)>" | grep -v grep | tr -s " " | cut -d " " -f 2)
I am not able to deploy since the container cannot be started because of this,
./entrypoint.sh: 15: wait: Illegal option -n
This is my code
#!/usr/bin/env bash
set -ex
ssh -i ./ssh_key "cloud-proxy@${HTTP_PROXY}" \
-N -D ${HTTP_TUNNEL} \
-o StrictHostKeyChecking=no &
env HTTPS_PROXY="socks5://${HTTP_TUNNEL}" \
node index.js &
wait -n
What could be the problem? Thanks