Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ssh -i <path-to-pem-file> ubuntu@<aws-ec2-public-ip>> << EOF
- kill $(ps aux | grep 'node' | awk '{print $2}')
- cd ~
- rm -rf <folder-path-of-git-repo>
- cd <folder-where-you-want-to-clone-git-repo>
- git clone <git-repo>
- cd <folder-path-of-git-repo>
- npm install
- nohup npm start &
- EOF
Add Comment
Please, Sign In to add comment