It is a common practice to perform git pull
on dev/staging/production server(s). I frequently do so myself; I perform git pull almost 100 times a day on my production server running linux.
I figure, it's time to make a script to improve that.
pull.sh will do these 3 commands
- git pull
- enter my-password (when prompt)
- service nginx reload
I've tried create my pull.sh here
#!/bin/bash
function pull {
git pull
password
service nginx reload
}
pull ;
Result
After running the script that I have, I still got prompt to input the password.
Any hints / helps / suggestions will be much appreciated !