Ai_GirlFriend/xunifriend_RaeeC/public/webhook.php
2026-01-31 19:15:41 +08:00

14 lines
422 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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;
}