다음 ssh 명령은 터미널로 반환하지 않습니다. 실행이 완료 되더라도 중지됩니다. echo hi 명령을 실행하면 실행이 중단됩니다.실행 후 ssh가 반환되지 않습니다.
ssh [email protected] "echo hello;source .profile;source .bash_profile;/apps/myapp/deploytools/ciInstallAndRun.sh; echo hi"
출력
hello
<outoutfrom remote script"
hi
ciInstallAndRun.sh
echo 'starting'
cd /apps/myapp/current
./tctl kill
cd /apps/myapp
mv myapp_v1.0 "myapp_v1.0_`date '+%Y%m%d%H%M'`"
unzip -o /apps/myapp/myappdist-bin.zip
java -classpath .:/apps/myapp/deploytools/cleanup.jar se.telenor.project.cleanup.Cleanup /apps/myapp myapp_v1.0_ 3
cd /apps/myapp/myapp_v1.0
echo 'Done with deploy'
chmod -R 775 *
echo 'Done'
./tctl start test
소스 OS : 레드햇 신지 OS : 솔라리스 10 8/07
어떤 생각이 문제를 해결합니다.
수정 내용? 여기서 어떤 부분이 작동하지 않습니까? 당신은 어떤 결과물을 기대합니까? – tripleee
@ tripleee. 죄송합니다. ssh 명령은 터미널로 리턴하지 않습니다. 실행이 완료 되더라도 중지됩니다. 도와 주시겠습니까? – Patan
그래서'echo hi' 후에 멈 춥니 다? 자급 자족하도록 질문을 편집하십시오. – tripleee