git auto update site on cpanel server

From WebHostingNeeds.com
Jump to: navigation, search
ssh -p 3333 [email protected]

mkdir ~/git-tmp
cd ~/git-tmp
git clone ssh://[email protected]:10022/buyscripts/netfreehost-com.git
cd ~/git-tmp/netfreehost-com
mv .git ~/public_html
cd ~/public_html
git checkout .

chmod -R 755 ~/public_html


[email protected] [~]# cat bin/gdn
#!/bin/bash

cd /home/netfree/public_html
git pull origin master
chmod -R 755 /home/netfree/public_html
[email protected] [~]# 


[email protected] [~]# crontab -l
SHELL="/bin/bash"
MAILTO="[email protected]"
*/5 * * * * /home/netfree/bin/gdn >/dev/null 2>&1
[email protected] [~]# 


git