[icinga-checkins] icinga.org: icinga-web/master: * Added command file switch (fixes #944)

git at icinga.org git at icinga.org
Mon Jan 17 14:00:04 CET 2011


Module: icinga-web
Branch: master
Commit: 1241fbf804af4f07dc9f8ebe087753e1939fdc12
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=1241fbf804af4f07dc9f8ebe087753e1939fdc12

Author: Marius Hein <marius.hein at netways.de>
Date:   Thu Jan 13 09:43:53 2011 +0100

* Added command file switch (fixes #944)

---

 app/modules/Web/config/icinga-io.xml.in |    8 ++++----
 configure                               |   16 ++++++++++++++++
 configure.ac                            |    7 +++++++
 3 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/app/modules/Web/config/icinga-io.xml.in b/app/modules/Web/config/icinga-io.xml.in
index b25af90..51ff35b 100644
--- a/app/modules/Web/config/icinga-io.xml.in
+++ b/app/modules/Web/config/icinga-io.xml.in
@@ -44,7 +44,7 @@
 						<ae:parameter name="type">IcingaApi::COMMAND_PIPE</ae:parameter>
 						<ae:parameter name="enabled">true</ae:parameter>
 						
-						<ae:parameter name="pipe">/usr/local/icinga/var/rw/icinga.cmd</ae:parameter>
+						<ae:parameter name="pipe">@api_cmd_file@</ae:parameter>
 
 						<ae:parameter name="instance">default</ae:parameter>
 						<ae:parameter name="broadcast">false</ae:parameter>
@@ -60,7 +60,7 @@
 						<ae:parameter name="type">IcingaApi::COMMAND_PIPE</ae:parameter>
 						<ae:parameter name="enabled">true</ae:parameter>
 						
-						<ae:parameter name="pipe">/usr/local/icinga/var/rw/icinga.cmd</ae:parameter>
+						<ae:parameter name="pipe">@api_cmd_file@</ae:parameter>
 
 						<ae:parameter name="instance">test</ae:parameter>
 						<ae:parameter name="broadcast">false</ae:parameter>
@@ -70,7 +70,7 @@
 						<ae:parameter name="type">IcingaApi::COMMAND_PIPE</ae:parameter>
 						<ae:parameter name="enabled">false</ae:parameter>
 						
-						<ae:parameter name="pipe">/usr/local/icinga/var/rw/icinga.cmd</ae:parameter>
+						<ae:parameter name="pipe">@api_cmd_file@</ae:parameter>
 
 						<ae:parameter name="instance"></ae:parameter>
 						<ae:parameter name="broadcast">true</ae:parameter>
@@ -87,7 +87,7 @@
 						<ae:parameter name="ssh_host">127.0.0.15</ae:parameter>
 						<ae:parameter name="ssh_port">22</ae:parameter>
 						<ae:parameter name="ssh_timeout">20</ae:parameter>
-						<ae:parameter name="ssh_pipe">/usr/local/icinga/var/rw/icinga.cmd</ae:parameter>
+						<ae:parameter name="ssh_pipe">@api_cmd_file@</ae:parameter>
 
 						<ae:parameter name="instance">default</ae:parameter>
 						<ae:parameter name="broadcast">false</ae:parameter>
diff --git a/configure b/configure
index a6b0fe5..1a9c53f 100755
--- a/configure
+++ b/configure
@@ -567,6 +567,7 @@ INSTALL_OPTS_WEB
 INSTALL_OPTS
 CFLAGS
 icinga_api
+api_cmd_file
 api_db_prefix
 api_db_name
 api_db_pass
@@ -669,6 +670,7 @@ with_api_db_user
 with_api_db_pass
 with_api_db_name
 with_api_db_prefix
+with_api_cmd_file
 with_devel_mode
 '
       ac_precious_vars='build_alias
@@ -1317,6 +1319,9 @@ Optional Packages:
                           DB name (default icinga)
   --with-api-db-prefix=PREFIX
                           DB table prefiy (default icinga_)
+  --with-api-cmd-file=PATH
+                          Icinga command file (default
+                          /usr/local/icinga/var/rw/icinga.cmd)
   --with-devel-mode       Web devel mode (disable caching)
 
 Some influential environment variables:
@@ -2497,6 +2502,16 @@ fi
 
 
 
+# Check whether --with-api_cmd_file was given.
+if test "${with_api_cmd_file+set}" = set; then :
+  withval=$with_api_cmd_file; api_cmd_file=$withval
+else
+  api_cmd_file=/usr/local/icinga/var/rw/icinga.cmd
+
+fi
+
+
+
 # Check whether --with-devel_mode was given.
 if test "${with_devel_mode+set}" = set; then :
   withval=$with_devel_mode; devel_mode=$withval
@@ -2572,6 +2587,7 @@ fi
 
 
 
+
 ac_config_files="$ac_config_files Makefile lib/Makefile pub/Makefile etc/Makefile bin/Makefile doc/Makefile app/Makefile etc/sitecfg/Makefile app/config/databases.xml app/config/icinga.xml app/config/settings.xml app/modules/Web/config/icinga-io.xml app/modules/AppKit/cache/Widgets/SquishLoader.xml etc/build.properties etc/tests/test.properties etc/apache2/icinga-web.conf bin/clearcache.sh pub/.htaccess pub/soap/.htaccess"
 
 
diff --git a/configure.ac b/configure.ac
index 5c9e674..b8af0f2 100755
--- a/configure.ac
+++ b/configure.ac
@@ -212,6 +212,12 @@ AC_ARG_WITH([api_db_prefix],
 	api_db_prefix=icinga_
 )
 
+AC_ARG_WITH([api_cmd_file],
+	AS_HELP_STRING([--with-api-cmd-file=PATH], [Icinga command file (default /usr/local/icinga/var/rw/icinga.cmd)]),
+	api_cmd_file=$withval,
+	api_cmd_file=/usr/local/icinga/var/rw/icinga.cmd
+)
+
 AC_ARG_WITH([devel_mode],
 	AS_HELP_STRING([--with-devel-mode], [Web devel mode (disable caching)]),
 	devel_mode=$withval,
@@ -256,6 +262,7 @@ AC_SUBST(api_db_user)
 AC_SUBST(api_db_pass)
 AC_SUBST(api_db_name)
 AC_SUBST(api_db_prefix)
+AC_SUBST(api_cmd_file)
 
 AC_SUBST(icinga_api)
 





More information about the icinga-checkins mailing list