Initiated update-mechanic, minor fixes
This commit is contained in:
8
check_update.php
Normal file
8
check_update.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$repoPath = '/usr/thos';
|
||||
$updateCount = trim(shell_exec("git -C $repoPath fetch origin && git -C $repoPath rev-list HEAD...origin/main --count"));
|
||||
|
||||
echo json_encode([
|
||||
'updates' => (int)$updateCount,
|
||||
'upToDate' => $updateCount === '0',
|
||||
]);
|
Reference in New Issue
Block a user