Difference between revisions of "git auto update site on cpanel server"

From WebHostingNeeds.com
Jump to: navigation, search
m
m
 
Line 1: Line 1:
<syntaxhighlight lang="bash" >
+
<pre>
  
 
ssh -p 3333 [email protected]
 
ssh -p 3333 [email protected]
Line 29: Line 29:
  
  
</syntaxhighlight>
+
</pre>
  
 
----
 
----
  
 
[[git]]
 
[[git]]

Latest revision as of 08:44, 1 February 2017

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