diff --git a/scripts/reset-php-fpm-opcache b/scripts/reset-php-fpm-opcache index 5e8bf75d..bc9e8f17 100755 --- a/scripts/reset-php-fpm-opcache +++ b/scripts/reset-php-fpm-opcache @@ -27,5 +27,5 @@ fi # MY_USERNAME ALL=(www-data) NOPASSWD: /usr/bin/env SCRIPT_FILENAME=/tmp/php-fpm-opcache-reset.php REQUEST_METHOD=GET cgi-fcgi -bind -connect * echo '' > /tmp/php-fpm-opcache-reset.php -sudo --user www-data env SCRIPT_FILENAME=/tmp/php-fpm-opcache-reset.php REQUEST_METHOD=GET cgi-fcgi -bind -connect "/run/php/$1.sock" &> /dev/null +sudo --user=www-data env SCRIPT_FILENAME=/tmp/php-fpm-opcache-reset.php REQUEST_METHOD=GET cgi-fcgi -bind -connect "/run/php/$1.sock" &> /dev/null rm /tmp/php-fpm-opcache-reset.php diff --git a/www/webhooks/github.php b/www/webhooks/github.php index 1dc5d77a..3a8de844 100644 --- a/www/webhooks/github.php +++ b/www/webhooks/github.php @@ -1,12 +1,14 @@ Write('Couldn\'t get last commit of local repo. Output: ' . implode("\n", $output)); } @@ -104,7 +106,7 @@ try{ // Now that we have the ebook filesystem path, pull the latest commit from GitHub. $output = []; - exec('sudo --set-home --user se-vcs-bot ' . SITE_ROOT . '/scripts/pull-from-github ' . escapeshellarg($dir) . ' 2>&1', $output, $returnCode); + exec('sudo --set-home --user=se-vcs-bot ' . SITE_ROOT . '/scripts/pull-from-github ' . escapeshellarg($dir) . ' 2>&1', $output, $returnCode); if($returnCode != 0){ $log->Write('Error pulling from GitHub. Output: ' . implode("\n", $output)); throw new Exceptions\WebhookException('Couldn\'t process ebook.', $post); @@ -115,7 +117,7 @@ try{ // Our local repo is now updated. Build the ebook! $output = []; - exec('sudo --set-home --user se-vcs-bot tsp ' . SITE_ROOT . '/web/scripts/deploy-ebook-to-www' . $lastPushHashFlag . ' ' . escapeshellarg($dir) . ' 2>&1', $output, $returnCode); + exec('sudo --set-home --user=se-vcs-bot tsp ' . SITE_ROOT . '/web/scripts/deploy-ebook-to-www' . $lastPushHashFlag . ' ' . escapeshellarg($dir) . ' 2>&1', $output, $returnCode); if($returnCode != 0){ $log->Write('Error queueing ebook for deployment to web. Output: ' . implode("\n", $output)); throw new Exceptions\WebhookException('Couldn\'t process ebook.', $post); @@ -151,4 +153,3 @@ catch(Exceptions\NoopException){ http_response_code(Enums\HttpCode::NoContent->value); } -?>