Answer the question
In order to leave comments, you need to log in
Why is there an error/warning in the ENDSSH: command not found script?
There is a script like this
ssh $user@$host << ENDSSH
cd /var/node/$app
git pull origin master
npm install
npm run build
pm2 restart $app // 21 line
ENDSSH // 22 line
./deploy.sh: line 21: pp: command not found
./deploy.sh: line 22: ENDSSH: command not found
Answer the question
In order to leave comments, you need to log in
Apparently, the problem is in the content of the app variable. Enclose in quotes:
ssh [email protected]$host << ENDSSH
cd /var/node/"$app"
git pull origin master
npm install
npm run build
pm2 restart "$app"
ENDSSH
The space after << is superfluous.
Well, just in case, // not a comment in bash, # should be.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question