So we are currently using the below step to restart our backend server. On one Server it works without any issues and on the other we receive the output as below. Anyway, the ssh run also states the step was succesfull.
We are using Windows server and the second server is a full clone of the first.
Any ideas what might cause that?
(i replaced the actual path in the output with its variable name)
<span><span>/usr/bin/bash: line 5: n: command not found</span></span>
<span><span>/usr/bin/bash: line 6: �h: command not found</span></span><span><span>/usr/bin/bash: line 7: $'\200o': command not found</span></span><span><span>/usr/bin/bash: line 8: C: command not found</span></span><span><span>/usr/bin/bash: line 5: n: command not found</span></span><span><span>/usr/bin/bash: line 6: $backendPath: Is a directory</span></span>
- step: &restart-backend
name: 'Restarts the backend'
script:
- 'echo ''cd'' $backendPath ''&& pm2 restart ecosystem.config.js'' > restart-script.sh'
- 'echo ''cd'' $backendPath ''&& pm2 status'' >> restart-script.sh'
- pipe: atlassian/ssh-run:0.8.0
variables:
SSH_USER: $User
SERVER: $Server
PORT: $Port
SSH_KEY: $sshkey
DEBUG: 'true'
MODE: 'script'
COMMAND: 'restart-script.sh'