From e81b8f8ecc67ae2848585a00de48e8cb72f60644 Mon Sep 17 00:00:00 2001 From: davegilligan Date: Wed, 13 May 2026 18:59:14 +0200 Subject: [PATCH] Webhook: full paths for nohup/bash in FPM environment Co-Authored-By: Claude Sonnet 4.6 --- scripts/deploy-hook.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/deploy-hook.php b/scripts/deploy-hook.php index 2de76bf..9ebfe00 100644 --- a/scripts/deploy-hook.php +++ b/scripts/deploy-hook.php @@ -32,7 +32,9 @@ if ($ref !== 'refs/heads/main') { } // Fire-and-forget — respond immediately, deploy runs in background -$cmd = 'nohup ' . escapeshellarg(DEPLOY_SCRIPT) . ' >> ' . escapeshellarg(LOG_FILE) . ' 2>&1 &'; +// Use full paths to avoid PATH issues in PHP-FPM minimal environment. +$cmd = '/usr/bin/nohup /usr/bin/bash ' . escapeshellarg(DEPLOY_SCRIPT) + . ' >> ' . escapeshellarg(LOG_FILE) . ' 2>&1 &'; shell_exec($cmd); echo json_encode(['ok' => true, 'deploying' => true, 'ref' => $ref]);