<?php
//----------------自己常试
//只需要登录www用户生成ssh-keygen -o
//再给www权限 sudo chown -R www:www /www/wwwroot/xxxx.fonnie.top/
//配置在仓库开启webhook即可
$data = file_get_contents('php://input');
$data = json_decode($data,true);
if($data['password'] == 'acafb5abc972a8d3103888'){
echo shell_exec('cd /www/wwwroot/xxxx.fonnie.top && git pull origin master 2>&1');
echo date('Y-m-d H:i:s');die;
}
echo 'you are dog!';