Code

Set gadget path in configuration file
[pkg-nagvis.git] / debian / patches / config.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## config.dpatch by Wolfgang Barth <wob@swobspace.net>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: changes default configs
7 @DPATCH@
8 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagvis-1.4.6~/etc/nagvis.ini.php-sample nagvis-1.4.6/etc/nagvis.ini.php-sample
9 --- nagvis-1.4.6~/etc/nagvis.ini.php-sample     2010-02-04 21:51:13.000000000 +0100
10 +++ nagvis-1.4.6/etc/nagvis.ini.php-sample      2011-09-07 14:19:01.000000000 +0200
11 @@ -24,17 +24,27 @@
12  
13  ; Path definitions
14  [paths]
15 -; absolute physical NagVis path
16 -;base="/usr/local/nagios/share/nagvis/"
17 +base="/usr/share/nagvis/htdocs/"
18 +cfg="/etc/nagvis/"
19 +var="/var/cache/nagvis/"
20 +mapcfg="/etc/nagvis/maps/"
21 +images="/var/lib/nagvis/images/"
22 +icon="/var/lib/nagvis/images/iconsets/"
23 +shape="/var/lib/nagvis/images/shapes/"
24 +map="/var/lib/nagvis/images/maps/"
25 +headertemplate="/etc/nagvis/templates/header/"
26 +hovertemplate="/etc/nagvis/templates/hover/"
27 +contexttemplate="/etc/nagvis/templates/context/"
28 +gadget="/etc/nagvis/gadgets"
29  ; absolute html NagVis path
30 -;htmlbase="/nagios/nagvis"
31 +htmlbase="/nagvis"
32  ; absolute html NagVis cgi path
33 -;htmlcgi="/nagios/cgi-bin"
34 +htmlcgi="/nagios3/cgi-bin"
35  
36  ; Default values which get inherited to the maps and its objects
37  [defaults]
38  ; default backend (id of the default backend)
39 -;backend="ndomy_1"
40 +backend="ndomy_1"
41  ; background color of maps
42  ;backgroundcolor="#fff"
43  ; Enable/Disable the context menu on map objects. With the context menu you are
44 @@ -158,8 +168,8 @@
45  ; ----------------------------
46  
47  ; Example definition of a livestatus backend. In this case the backend_id is live_1
48 -[backend_live_1]
49 -backendtype="mklivestatus"
50 +;[backend_live_1]
51 +;backendtype="mklivestatus"
52  ;socket="unix:/usr/local/nagios/var/rw/live"
53  
54  ; in this example the ID of the Backend is "ndomy_1" you can define another ID.
55 @@ -186,9 +196,9 @@
56  ;htmlcgi="/nagios/cgi-bin"
57  
58  ; in this example the ID of the Backend is "ndo2fs_1" you can define another ID.
59 -[backend_ndo2fs_1]
60 +;[backend_ndo2fs_1]
61  ; type of backend - MUST be set
62 -backendtype="ndo2fs"
63 +;backendtype="ndo2fs"
64  ; Path to the ndo2fs var directory where the VOLATILE and PERSISTENT directories are
65  ;path="/usr/local/ndo2fs/var"
66  ; Name of the instance to get the data from
67 @@ -223,12 +233,12 @@
68  
69  ; in this example the browser switches between the maps demo and demo2 every 15
70  ; seconds, the rotation is enabled by url: index.php?rotation=demo
71 -[rotation_demo]
72 +;[rotation_demo]
73  ; These steps are rotated. The "Demo2:" is a label which is being displayed in
74  ; the index pages rotation list.
75 -maps="demo,Demo2:demo2"
76 +;maps="demo,Demo2:demo2"
77  ; rotation interval (seconds)
78 -interval=15
79 +;interval=15
80  
81  ; ------------------------------------------------------------------------------
82  ; Below you find some advanced stuff
83 diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagvis-1.4.6~/nagvis/includes/defines/global.php nagvis-1.4.6/nagvis/includes/defines/global.php
84 --- nagvis-1.4.6~/nagvis/includes/defines/global.php    2010-02-04 21:51:13.000000000 +0100
85 +++ nagvis-1.4.6/nagvis/includes/defines/global.php     2011-09-07 14:18:33.000000000 +0200
86 @@ -61,13 +61,13 @@
87  define('DEBUGLEVEL', 4);
88  
89  // Path to the debug file
90 -define('DEBUGFILE', '../var/nagvis-debug.log');
91 +define('DEBUGFILE', '/var/log/nagvis-debug.log');
92  
93  // NagVis Version
94  define('CONST_VERSION', '1.4.6');
95  
96  // Path to the main configuration file
97 -define('CONST_MAINCFG', '../etc/nagvis.ini.php');
98 +define('CONST_MAINCFG', '/etc/nagvis/nagvis.ini.php');
99  
100  // Needed minimal PHP version
101  define('CONST_NEEDED_PHP_VERSION', '5.0');