summaryrefslogtreecommitdiffstats
path: root/cron.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-07-08 15:55:17 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-07-08 15:55:17 +0200
commitc2d88a08b796ca19c8b5ec63bfd34ac32ead4208 (patch)
treef18e0ba4d05361456a6712378ccc0784620c1e9c /cron.php
parent48f9e4ed03f3148d62919a95496ee43164d3e707 (diff)
downloadnextcloud-server-c2d88a08b796ca19c8b5ec63bfd34ac32ead4208.tar.gz
nextcloud-server-c2d88a08b796ca19c8b5ec63bfd34ac32ead4208.zip
Remove unneeded checks if it runs on a Windows machine
* the setup check is still there
Diffstat (limited to 'cron.php')
-rw-r--r--cron.php24
1 files changed, 11 insertions, 13 deletions
diff --git a/cron.php b/cron.php
index bf258932a01..5be52a302a5 100644
--- a/cron.php
+++ b/cron.php
@@ -84,19 +84,17 @@ try {
set_time_limit(0);
// the cron job must be executed with the right user
- if (!OC_Util::runningOnWindows()) {
- if (!function_exists('posix_getuid')) {
- echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL;
- exit(0);
- }
- $user = posix_getpwuid(posix_getuid());
- $configUser = posix_getpwuid(fileowner(OC::$SERVERROOT . '/config/config.php'));
- if ($user['name'] !== $configUser['name']) {
- 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);
- }
+ if (!function_exists('posix_getuid')) {
+ echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL;
+ exit(0);
+ }
+ $user = posix_getpwuid(posix_getuid());
+ $configUser = posix_getpwuid(fileowner(OC::$SERVERROOT . '/config/config.php'));
+ if ($user['name'] !== $configUser['name']) {
+ 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);
}
// We call ownCloud from the CLI (aka cron)