Skip to content

Instantly share code, notes, and snippets.

@mlakkadshaw
mlakkadshaw / setup.sh
Last active December 25, 2015 12:28
Setup automatic deployment on your server using this shell script. After this shell script is executed you can deploy code using "git push server master"
#!/bin/bash
# A bash script to setup GIT like deployment on your server
echo "Enter your server address e.g 25.32.132.1 or yourserver.com"
read serverAddress
echo "Enter Username which you use to login to your server e.g ubuntu"
read username
echo "Enter path of the private key (optional)"
read privateKeyPath
echo "Path of your server directory where code should reside: e.g ~/code or /var/www (required)"
read tempPath