File: 0001-Change-install-paths.patch

package info (click to toggle)
shaarli 0.14.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,612 kB
  • sloc: php: 30,001; javascript: 2,083; makefile: 139; xml: 69; python: 42; sh: 35
file content (61 lines) | stat: -rw-r--r-- 3,019 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From: Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>
Date: Tue, 26 May 2020 10:11:43 -0400
Subject: Change install paths

Set the location of the data, cache, pagecache and tmp directories to
/var/lib/shaarli/data
/var/cache/shaarli/cache
/var/cache/shaarli/pagecache
/var/cache/shaarli/tmp

instead of their paths being relative to the application's directory.

Forwarded: not-needed
---
 application/config/ConfigManager.php | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/application/config/ConfigManager.php b/application/config/ConfigManager.php
index b98a746..e4bdcc3 100644
--- a/application/config/ConfigManager.php
+++ b/application/config/ConfigManager.php
@@ -43,7 +43,7 @@ class ConfigManager
      *
      * @param string $configFile Configuration file path without extension.
      */
-    public function __construct($configFile = 'data/config')
+    public function __construct($configFile = '/var/lib/shaarli/data/config')
     {
         $this->configFile = $configFile;
         $this->initialize();
@@ -343,19 +343,19 @@ class ConfigManager
      */
     protected function setDefaultValues()
     {
-        $this->setEmpty('resource.data_dir', 'data');
-        $this->setEmpty('resource.config', 'data/config.php');
-        $this->setEmpty('resource.datastore', 'data/datastore.php');
-        $this->setEmpty('resource.ban_file', 'data/ipbans.php');
-        $this->setEmpty('resource.updates', 'data/updates.txt');
-        $this->setEmpty('resource.log', 'data/log.txt');
-        $this->setEmpty('resource.update_check', 'data/lastupdatecheck.txt');
-        $this->setEmpty('resource.history', 'data/history.php');
+        $this->setEmpty('resource.data_dir', '/var/lib/shaarli/data');
+        $this->setEmpty('resource.config', '/var/lib/shaarli/data/config.php');
+        $this->setEmpty('resource.datastore', '/var/lib/shaarli/data/datastore.php');
+        $this->setEmpty('resource.ban_file', '/var/lib/shaarli/data/ipbans.php');
+        $this->setEmpty('resource.updates', '/var/lib/shaarli/data/updates.txt');
+        $this->setEmpty('resource.log', '/var/lib/shaarli/data/log.txt');
+        $this->setEmpty('resource.update_check', '/var/lib/shaarli/data/lastupdatecheck.txt');
+        $this->setEmpty('resource.history', '/var/lib/shaarli/data/history.php');
         $this->setEmpty('resource.raintpl_tpl', 'tpl/');
         $this->setEmpty('resource.theme', 'default');
-        $this->setEmpty('resource.raintpl_tmp', 'tmp/');
-        $this->setEmpty('resource.thumbnails_cache', 'cache');
-        $this->setEmpty('resource.page_cache', 'pagecache');
+        $this->setEmpty('resource.raintpl_tmp', '/var/cache/shaarli/tmp/');
+        $this->setEmpty('resource.thumbnails_cache', '/var/cache/shaarli/cache');
+        $this->setEmpty('resource.page_cache', '/var/cache/shaarli/pagecache');
 
         $this->setEmpty('security.ban_after', 4);
         $this->setEmpty('security.ban_duration', 1800);