diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/web-apps/rss-bridge/paths.patch')
-rw-r--r-- | nixpkgs/pkgs/servers/web-apps/rss-bridge/paths.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/web-apps/rss-bridge/paths.patch b/nixpkgs/pkgs/servers/web-apps/rss-bridge/paths.patch new file mode 100644 index 000000000000..21747a381bd6 --- /dev/null +++ b/nixpkgs/pkgs/servers/web-apps/rss-bridge/paths.patch @@ -0,0 +1,38 @@ +diff --git a/lib/Configuration.php b/lib/Configuration.php +index 63f67a3c..f0a53a24 100644 +--- a/lib/Configuration.php ++++ b/lib/Configuration.php +@@ -81,8 +81,8 @@ public static function loadConfiguration(array $customConfig = [], array $env = + } + } + +- if (file_exists(__DIR__ . '/../whitelist.txt')) { +- $enabledBridges = trim(file_get_contents(__DIR__ . '/../whitelist.txt')); ++ if (file_exists(getenv('RSSBRIDGE_DATA') . '/whitelist.txt')) { ++ $enabledBridges = trim(file_get_contents(getenv('RSSBRIDGE_DATA') . '/whitelist.txt')); + if ($enabledBridges === '*') { + self::setConfig('system', 'enabled_bridges', ['*']); + } else { +diff --git a/lib/bootstrap.php b/lib/bootstrap.php +index 6465f5f9..4605596f 100644 +--- a/lib/bootstrap.php ++++ b/lib/bootstrap.php +@@ -1,7 +1,7 @@ + <?php + + const PATH_LIB_CACHES = __DIR__ . '/../caches/'; +-const PATH_CACHE = __DIR__ . '/../cache/'; ++define('PATH_CACHE', getenv('RSSBRIDGE_DATA') . '/cache/'); + + // Allow larger files for simple_html_dom + // todo: extract to config (if possible) +@@ -43,7 +43,7 @@ + }); + + $customConfig = []; +-if (file_exists(__DIR__ . '/../config.ini.php')) { +- $customConfig = parse_ini_file(__DIR__ . '/../config.ini.php', true, INI_SCANNER_TYPED); ++if (file_exists(getenv('RSSBRIDGE_DATA') . '/config.ini.php')) { ++ $customConfig = parse_ini_file(getenv('RSSBRIDGE_DATA') . '/config.ini.php', true, INI_SCANNER_TYPED); + } + Configuration::loadConfiguration($customConfig, getenv()); |