Ai_GirlFriend/xunifriend_RaeeC/public/webhook.php

14 lines
422 B
PHP
Raw Normal View History

2026-01-31 19:15:41 +08:00
<?php
// $command = 'cd /www/wwwroot/bjweb/ && sudo git pull';
$command = 'cd "$(dirname "$0")" && sudo git pull';
$res = shell_exec($command);
if (strpos($res,'Updating') !== false){
$command1 = 'sudo git stash && sudo git pull && sudo git stash pop';
$res1 = shell_exec($command1);
echo '执行结果' . $res1;
echo 'git pull执行结果' . $res;
} else{
echo 'git pull执行结果' . $res;
}