Skip to content

Instantly share code, notes, and snippets.

View copuzzle's full-sized avatar

copuzzle copuzzle

  • CN ShengZheng
View GitHub Profile
@copuzzle
copuzzle / pull.php
Last active March 12, 2018 15:13
git webhook
header("Content-type: text/html; charset=utf-8");
$body = file_get_contents('php://input');
error_log($body, 3, 'hookInfo.log');
$js = json_decode($body, true);
if ($js['password'] == "yourPassword") {
$a = shell_exec( 'cd /data/www/yourProject && sudo -u www /usr/bin/git pull 2>&1' );
die("SUCCESS.");
connect_from_port_20=YES
#生成日志
xferlog_enable=YES
#指定登录转向目录
local_root=/var/www/share/lsgo
#chown_uploads=YES
#chown_username=anyone