diff options
Diffstat (limited to 'deploy')
-rwxr-xr-x | deploy/trustme.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/deploy/trustme.sh b/deploy/trustme.sh index a0414fd9..38e2d838 100755 --- a/deploy/trustme.sh +++ b/deploy/trustme.sh @@ -48,7 +48,11 @@ fi #clear old public key print_log "clear old info in known_hosts file on localhost ..." -ssh-keygen -R $ip +test ! -f ~/.ssh/known_hosts || ssh-keygen -R $ip +if [ $? != 0 ]; then + print_log "clear old info in known_hosts file on localhost failed" + exit 1 +fi #copy new public key print_log "copy my public key to $ip ..." |