diff --git a/configure.ac b/configure.ac index 147d0552e..803fd5b6b 100755 --- a/configure.ac +++ b/configure.ac @@ -173,10 +173,14 @@ AC_ARG_WITH([ldap_rootdn], ) <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> Add Autoconf based installation with most parameters AC_ARG_WITH([ldap_user_objectclass], AS_HELP_STRING([--with-ldap-user-objectclass=LDAP_OBJECT_CLASS], [ldap object class to use for user authentication (default: inetOrgPerson)]), ldap_user_objectclass=$withval, ldap_user_objectclass="inetOrgPerson" +<<<<<<< HEAD ) AC_ARG_WITH([ldap_attribute_username], @@ -191,15 +195,25 @@ AC_ARG_WITH([ldap_user_class], AC_ARG_WITH([ldap_attribute_username], AS_HELP_STRING([--with-ldap-attribute-username=LDAP_ATTRIBUTE], [user attribute to use for the username (defaults uid)]), >>>>>>> ws-jmosshammer:icinga2-web moja$ git commit +======= +) + +AC_ARG_WITH([ldap_attribute_username], + AS_HELP_STRING([--with-ldap-attribute-username=LDAP_ATTRIBUTE], [user attribute to use for the username (default: uid)]), +>>>>>>> Add Autoconf based installation with most parameters ldap_attribute_username=$withval, ldap_attribute_username="uid" ) <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> Add Autoconf based installation with most parameters AC_ARG_WITH([ldap_attribute_password], AS_HELP_STRING([--with-ldap-attribute-password=LDAP_ATTRIBUTE], [user attribute to use for the password (default: password)]), ldap_attribute_password=$withval, ldap_attribute_password="password" +<<<<<<< HEAD ) AC_ARG_WITH([ldap_group_objectclass], @@ -307,27 +321,123 @@ AC_ARG_WITH([ldap_attribute_firstname], AS_HELP_STRING([--with-ldap-attribute-firstname=LDAP_ATTRIBUTE], [user attribute to use for the firstname (defaults firstname)]), ldap_attribute_firstname=$withval, ldap_attribute_firstname="firstname" +======= +>>>>>>> Add Autoconf based installation with most parameters ) -AC_ARG_WITH([ldap_attribute_lastname], - AS_HELP_STRING([--with-ldap-attribute-lastname=LDAP_ATTRIBUTE], [user attribute to use for the lastname (defaults lastname)]), - ldap_attribute_lastname=$withval, - ldap_attribute_lastname="lastname" +AC_ARG_WITH([ldap_group_objectclass], + AS_HELP_STRING([--with-ldap-group-objectclass=LDAP_ATTRIBUTE], [ldap object type to use for group authentication (default: inetOrgPerson)]), + ldap_group_objectclass=$withval, + ldap_group_objectclass="group" +) + +AC_ARG_WITH([ldap_attribute_groupname], + AS_HELP_STRING([--with-ldap-attribute-groupname=LDAP_OBJECT_CLASS], [user object type to use for the authentication (default: inetOrgPerson)]), + ldap_attribute_groupname=$withval, + ldap_attribute_groupname="guid" +) + + +# +# Icinga backend selection +# + +AC_ARG_WITH([icinga_backend], + AS_HELP_STRING([--with-icinga-backend=(ido, statusdat, livestatus)], [backend to use for rb (default: statusdat)]), + icinga_backend=$withval, + icinga_backend="statusdat" ) -AC_ARG_WITH([ldap_attribute_password], - AS_HELP_STRING([--with-ldap-attribute-password=LDAP_ATTRIBUTE], [user attribute to use for the password (defaults password)]), - ldap_attribute_password=$withval, - ldap_attribute_password="password" +# +# Ido settings +# + +AC_ARG_WITH([ido_db_type], + AS_HELP_STRING([--with-ido-db-type=(mysql, pgsql)], [database engine to use for retrieving data from the ido db (default: mysql)]), + ido_db_type=$withval, + ido_db_type="statusdat" ) +AC_ARG_WITH([ido_host], + AS_HELP_STRING([--with-ido-host=HOST], [host to use for retrieving data from the ido db (default: localhost)]), + ido_host=$withval, + ido_host="localhost" +) + +AC_ARG_WITH([ido_port], + AS_HELP_STRING([--with-ido-port=PORT], [backend to use for retrieving data from the ido db (default: 3306 for mysql. 5432 for pgsql)]), + ido_port=$withval, + ido_port=db_default_port +) + + +AC_ARG_WITH([ido_database], + AS_HELP_STRING([--with-ido-database=DATABASE], [database name to use for retrieving data from the ido db (default: icinga)]), + ido_database=$withval, + ido_database="icinga" +) + + +AC_ARG_WITH([ido_user], + AS_HELP_STRING([--with-ido-host=USER], [user to use for retrieving data from the ido db (default: icinga)]), + ido_user=$withval, + ido_user="icinga" +) + +AC_ARG_WITH([ido_password], + AS_HELP_STRING([--with-ido-password=PASSWORD], [password to use for retrieving data from the ido db (default: icinga)]), + ido_password=$withval, + ido_password="icinga" +) + +# +# Statusdat file location +# + +AC_ARG_WITH([statusdat_file], + AS_HELP_STRING([--with-statusdat-file=FILE], [location of the status.dat file when retrieving data from status.dat (default: /usr/local/icinga/var/status.dat)]), + statusdat_file=$withval, + statusdat_file="/usr/local/icinga/var/status.dat" +) + +<<<<<<< HEAD >>>>>>> ws-jmosshammer:icinga2-web moja$ git commit +======= +AC_ARG_WITH([objects_cache_file], + AS_HELP_STRING([--with-objects-file=FILE], [location of the objects.cache file when retrieving data from status.dat (default: /usr/local/icinga/var/objects.cache)]), + objects_cache_file=$withval, + objects_cache_file="/usr/local/icinga/var/objects.cache" +) + +# +# Livestatus connection +# + +AC_ARG_WITH([livestatus_socket], + AS_HELP_STRING([--with-livestatus-socket=FILE], [location of the livestatus socket (default: /usr/local/icinga/var/rw/live)]), + livestatus_socket=$withval, + livestatus_socket="/usr/local/icinga/var/rw/live" +) + +# +# Icinga commandpipe +# + +AC_ARG_WITH([icinga_commandpipe], + AS_HELP_STRING([--with-icinga-commandpipe=FILE], [location of the command pipe used for sending commands (default: /usr/local/icinga/var/rw/icinga.cmd)]), + icinga_commandpipe=$withval, + icinga_commandpipe="/usr/local/icinga/var/rw/icinga.cmd" +) +>>>>>>> Add Autoconf based installation with most parameters # Installation options INSTALL_OPTS="-o $bin_user -g $bin_group" INSTALL_OPTS_WEB="-o $web_user -g $web_group" <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> Add Autoconf based installation with most parameters AS_IF([test "x$internal_db_type" = xmysql], [ AC_CHECK_PHP_INCLUDE([Zend/Db/Adapter/Pdo/Mysql.php],[Zend Framework - MySQL PDO Adapter]) AC_CHECK_PHP_MODULE([mysql]) @@ -364,20 +474,25 @@ AS_CASE([$icinga_backend], ["livestatus"], [livestatus_enabled=""], [statusdat_enabled=""]) +<<<<<<< HEAD AS_IF([test "x$ldap_authentication" != xno], AC_CHECK_PHP_MODULE([ldap]) ldap_enabled="" ) ======= +======= +>>>>>>> Add Autoconf based installation with most parameters -AS_IF([test "x$internal_db_type" == xmysql], - [AC_CHECK_PHP_INCLUDE([Zend/Db/Adapter/Pdo/Mysql.php],[Zend Framework - MySQL PDO Adapter])]) -AS_IF([test "x$internal_db_type" == xpgsql], - [AC_CHECK_PHP_INCLUDE([Zend/Db/Adapter/Pdo/Pgsql.php],[Zend Framework - PostgreSQL PDO Adapter])]) AS_IF([test "x$ldap_authentication" != xno], +<<<<<<< HEAD AC_CHECK_PHP_MODULE([ldap])) >>>>>>> ws-jmosshammer:icinga2-web moja$ git commit +======= + AC_CHECK_PHP_MODULE([ldap]) + ldap_enabled="" +) +>>>>>>> Add Autoconf based installation with most parameters # Installation directives AC_SUBST(app_name) @@ -388,6 +503,60 @@ AC_SUBST(www_conf_path) AC_SUBST(bin_user) AC_SUBST(bin_group) AC_SUBST(icinga2web_config_path) +<<<<<<< HEAD + +# Internal db setup +AC_SUBST(internal_db_type) +AC_SUBST(internal_db_name) +AC_SUBST(internal_db_host) +AC_SUBST(internal_db_port) +AC_SUBST(internal_db_user) +AC_SUBST(internal_db_pass) + +# ldap setup +AC_SUBST(ldap_host) +AC_SUBST(ldap_port) +AC_SUBST(ldap_rootdn) +AC_SUBST(ldap_binddn) +AC_SUBST(ldap_bindpass) +AC_SUBST(ldap_user_objectclass) +AC_SUBST(ldap_attribute_basedn) +AC_SUBST(ldap_attribute_username) +AC_SUBST(ldap_attribute_password) +AC_SUBST(ldap_group_objectclass) +AC_SUBST(ldap_attribute_groupname) + +# backend setup +AC_SUBST(icinga_backend) + +# ido backend variables +AC_SUBST(ido_db_type) +AC_SUBST(ido_host) +AC_SUBST(ido_port) +AC_SUBST(ido_database) +AC_SUBST(ido_user) +AC_SUBST(ido_password) + +# status.dat backend +AC_SUBST(statusdat_file) +AC_SUBST(objects_cache_file) + +# livestatus backend +AC_SUBST(livestatus_socket) + +# command pipe +AC_SUBST(icinga_commandpipe) + + +# +# Comment placeholders for toggling backends +# +AC_SUBST(livestatus_enabled) +AC_SUBST(statusdat_enabled) +AC_SUBST(ido_enabled) +AC_SUBST(ldap_enabled) +======= +>>>>>>> Add Autoconf based installation with most parameters # Internal db setup AC_SUBST(internal_db_type) @@ -440,28 +609,6 @@ AC_SUBST(statusdat_enabled) AC_SUBST(ido_enabled) AC_SUBST(ldap_enabled) -# Internal db setup -AC_SUBST(internal_db_type) -AC_SUBST(internal_db_name) -AC_SUBST(internal_db_host) -AC_SUBST(internal_db_port) -AC_SUBST(internal_db_user) -AC_SUBST(internal_db_pass) - -# ldap setup -AC_SUBST(ldap_host) -AC_SUBST(ldap_port) -AC_SUBST(ldap_rootdn) -AC_SUBST(ldap_binddn) -AC_SUBST(ldap_bindpass) -AC_SUBST(ldap_user_class) -AC_SUBST(ldap_attribute_basedn) -AC_SUBST(ldap_attribute_username) -AC_SUBST(ldap_attribute_firstname) -AC_SUBST(ldap_attribute_lastname) -AC_SUBST(ldap_attribute_password) - - AC_SUBST(PHP) AC_SUBST(INSTALL_OPTS) AC_SUBST(INSTALL_OPTS_WEB) diff --git a/etc/config/authentication_db.ini.in b/etc/config/authentication_db.ini.in deleted file mode 100644 index d57b573f8..000000000 --- a/etc/config/authentication_db.ini.in +++ /dev/null @@ -1,9 +0,0 @@ -[users] -backend=db -type=@internal_db_type@ -host=@internal_db_host@ -port=@internal_db_port@ -database=@internal_db_name@ -user=@internal_db_user@ -password=@internal_db_pass@ - diff --git a/etc/config/authentication_ldap.ini.in b/etc/config/authentication_ldap.ini.in deleted file mode 100644 index 4d50d285f..000000000 --- a/etc/config/authentication_ldap.ini.in +++ /dev/null @@ -1,15 +0,0 @@ -[users] -backend=ldap -hostname=@ldap_host@ -port=@ldap_port@ -root_dn='@ldap_rootdn@' -bind_dn='@ldap_binddn@' -bind_pw=@ldap_bindpass@ - -; Attributes for ldap user lookup -user_class=@ldap_user_class@ -user_name_attribute=@ldap_attribute_username@ -user_firstname_attribute=@ldap_attribute_firstname@ -user_lastname_attribute=@ldap_attribute_lastname@ -user_password_attribute=@ldap_attribute_password@ -