diff options
author | Artem Sidorenko <artem@posteo.de> | 2017-03-08 20:04:55 +0100 |
---|---|---|
committer | Artem Sidorenko <artem@posteo.de> | 2017-03-08 20:04:55 +0100 |
commit | 4541240da2d0ee1fc6845130373b4cad4a2e0a9e (patch) | |
tree | c7dcd755c809c193f3e409a80224692e16c6d43a /cron.php | |
parent | 2a8e922d67a1246e101f926f1b0ab287db71929e (diff) | |
download | nextcloud-server-4541240da2d0ee1fc6845130373b4cad4a2e0a9e.tar.gz nextcloud-server-4541240da2d0ee1fc6845130373b4cad4a2e0a9e.zip |
Exit with error code if posix ext missing or wrong user
similar to the console.php
Diffstat (limited to 'cron.php')
-rw-r--r-- | cron.php | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |