summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-03-10 18:18:59 +0100
committerGitHub <noreply@github.com>2017-03-10 18:18:59 +0100
commit27de443fc40ee59cdfcd05e4139512c029e34259 (patch)
tree3b5b0a0d7e8744fb492cec60e70a35df658a099e
parent42ee4013768db719e2209978e3b7d30fd88188f9 (diff)
parent4541240da2d0ee1fc6845130373b4cad4a2e0a9e (diff)
downloadnextcloud-server-27de443fc40ee59cdfcd05e4139512c029e34259.tar.gz
nextcloud-server-27de443fc40ee59cdfcd05e4139512c029e34259.zip
Merge pull request #3774 from artem-sidorenko/posix-exit-1
Exit with error code if posix ext missing or wrong user
-rw-r--r--cron.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/cron.php b/cron.php
index 55666fbc937..feb680bd9c2 100644
--- a/cron.php
+++ b/cron.php
@@ -89,7 +89,7 @@ try {
// the cron job must be executed with the right user
if (!function_exists('posix_getuid')) {
echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL;
- exit(0);
+ exit(1);
}
$user = posix_getpwuid(posix_getuid());
$configUser = posix_getpwuid(fileowner(OC::$configDir . 'config.php'));
@@ -97,7 +97,7 @@ try {
echo "Console has to be executed with the same user as the web server is operated" . PHP_EOL;
echo "Current user: " . $user['name'] . PHP_EOL;
echo "Web server user: " . $configUser['name'] . PHP_EOL;
- exit(0);
+ exit(1);
}
// We call ownCloud from the CLI (aka cron)