From 982bdb182329602e1776d704a2662bd2ab09bf98 Mon Sep 17 00:00:00 2001 From: Damjan Georgievski Date: Fri, 29 Jul 2016 17:47:39 +0200 Subject: introduce NEXTCLOUD_CONFIG_DIR env variable (see #300) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nextcloud by default uses the `/config/` directory in the source/application tree for its config file(s). with this commit that directory can be overridden by the `NEXTCLOUD_CONFIG_DIR` environment variable. in uwsgi, you would use the option `--env "NEXTCLOUD_CONFIG_DIR=/tmp/nx-config/"` in apache `SetENV …` and the cli command can be run with: `NEXTCLOUD_CONFIG_DIR=/tmp/nx-config ./occ` (or just use `export` once in the shell). NEXTCLOUD_CONFIG_DIR can be supplied with or without the trailing slash (`/`), but in all cases `$configDir` will have it automatically added if needed. The other changes are several occurrences of `OC::$SERVERROOT . '/config'` to `OC::$configDir`. --- cron.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cron.php') diff --git a/cron.php b/cron.php index b1dedaa84b2..4248157b4c8 100644 --- a/cron.php +++ b/cron.php @@ -90,7 +90,7 @@ try { exit(0); } $user = posix_getpwuid(posix_getuid()); - $configUser = posix_getpwuid(fileowner(OC::$SERVERROOT . '/config/config.php')); + $configUser = posix_getpwuid(fileowner(OC::$configDir . '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; -- cgit v1.2.3