Code

Renamed sysdbd.conf to sysdbd.conf.sample.
authorSebastian Harl <sh@tokkee.org>
Sun, 10 Mar 2013 18:37:06 +0000 (19:37 +0100)
committerSebastian Harl <sh@tokkee.org>
Sun, 10 Mar 2013 18:37:06 +0000 (19:37 +0100)
Also, unconditionally install that file; the user is expected to not change the
.sample file but rather use her own custom sysdbd.conf (there is no generic
config file anyway that could be shipped and enabled by default).

src/Makefile.am
src/daemon/sysdbd.conf [deleted file]
src/daemon/sysdbd.conf.sample [new file with mode: 0644]

index 787ecdaa2c63cc3b4efccc31350348767abf0046..b75bfff7707df6baf99c1d0e22e6cfd5f06a496b 100644 (file)
@@ -48,6 +48,9 @@ sysdbd_CFLAGS = $(AM_CFLAGS) -DBUILD_DATE="\"$$( date --utc '+%F %T' ) (UTC)\""
 sysdbd_LDADD = libsysdb.la liboconfig/liboconfig.la
 sysdbd_DEPENDENCIES = liboconfig/liboconfig.la
 
+sdbconfdir = $(sysconfdir)/sysdb
+dist_sdbconf_DATA = daemon/sysdbd.conf.sample
+
 pkgbackendlibdir = $(pkglibdir)/backend
 
 pkgbackendlib_LTLIBRARIES =
@@ -85,13 +88,3 @@ include/sysdb.h: include/sysdb.h.in ../version
            -e "s/@SDB_VERSION_STRING@/$$VERSION_STRING/g" \
            include/sysdb.h.in > include/sysdb.h
 
-install-exec-hook:
-       $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/sysdb
-       if test -e $(DESTDIR)$(sysconfdir)/sysdb/sysdbd.conf; then \
-               $(INSTALL) -m 0640 daemon/sysdbd.conf \
-                       $(DESTDIR)$(sysconfdir)/sysdb/sysdbd.conf.pkg-orig; \
-       else \
-               $(INSTALL) -m 0640 daemon/sysdbd.conf \
-                       $(DESTDIR)$(sysconfdir)/sysdb/sysdbd.conf; \
-       fi
-
diff --git a/src/daemon/sysdbd.conf b/src/daemon/sysdbd.conf
deleted file mode 100644 (file)
index f6749e1..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Configuration file for the System DataBase daemon (SysDBd).
-#
-
-#----------------------------------------------------------------------------#
-# Global options:                                                            #
-# This section defines global settings and default values for the daemon.    #
-#----------------------------------------------------------------------------#
-
-# default interval used for actively polling plugins
-Interval 300
-
-#----------------------------------------------------------------------------#
-# Plugins:                                                                   #
-# Plugins are the working horses of SysDB. Load any of the following plugins #
-# to active the respective feature.                                          #
-#                                                                            #
-# "Backends" are plugins which collect information to be stored in SysDB     #
-# while other plugins may add additional features to the daemon. Each        #
-# backend may use its own custom query interval by specifying the 'Interval' #
-# option:                                                                    #
-#   <LoadBackend "foo">                                                      #
-#       Interval 60                                                          #
-#   </LoadPlugin>                                                            #
-#----------------------------------------------------------------------------#
-
-LoadBackend "collectd"
-LoadBackend "mk-livestatus"
-LoadBackend "puppet-storeconfigs"
-
-#----------------------------------------------------------------------------#
-# Plugin configuration:                                                      #
-#----------------------------------------------------------------------------#
-
-<Backend "collectd">
-       <Instance "central-collector">
-               Socket "/var/run/collectd-unixsock"
-       </Instance>
-</Backend>
-
-<Backend "mk-livestatus">
-       <Instance "nagios4-master">
-               Socket "/var/lib/nagios4/rw/live"
-       </Instance>
-</Backend>
-
-<Backend "puppet-storeconfigs">
-       <Connection "puppet">
-               DBAdapter "pgsql"
-               DBName "puppet"
-               DBServer "puppet.domain.tld"
-               DBPort "5432"
-               DBUser "puppet"
-               DBPassword "secret1"
-               DBIOption "name" "value"
-       </Connection>
-</Backend>
-
diff --git a/src/daemon/sysdbd.conf.sample b/src/daemon/sysdbd.conf.sample
new file mode 100644 (file)
index 0000000..60a4656
--- /dev/null
@@ -0,0 +1,58 @@
+#
+# Sample configuration file for the System DataBase daemon (SysDBd).
+#
+
+#----------------------------------------------------------------------------#
+# Global options:                                                            #
+# This section defines global settings and default values for the daemon.    #
+#----------------------------------------------------------------------------#
+
+# default interval used for actively polling plugins
+Interval 300
+
+#----------------------------------------------------------------------------#
+# Plugins:                                                                   #
+# Plugins are the working horses of SysDB. Load any of the following plugins #
+# to active the respective feature.                                          #
+#                                                                            #
+# "Backends" are plugins which collect information to be stored in SysDB     #
+# while other plugins may add additional features to the daemon. Each        #
+# backend may use its own custom query interval by specifying the 'Interval' #
+# option:                                                                    #
+#   <LoadBackend "foo">                                                      #
+#       Interval 60                                                          #
+#   </LoadPlugin>                                                            #
+#----------------------------------------------------------------------------#
+
+LoadBackend "collectd"
+LoadBackend "mk-livestatus"
+LoadBackend "puppet-storeconfigs"
+
+#----------------------------------------------------------------------------#
+# Plugin configuration:                                                      #
+#----------------------------------------------------------------------------#
+
+<Backend "collectd">
+       <Instance "central-collector">
+               Socket "/var/run/collectd-unixsock"
+       </Instance>
+</Backend>
+
+<Backend "mk-livestatus">
+       <Instance "nagios4-master">
+               Socket "/var/lib/nagios4/rw/live"
+       </Instance>
+</Backend>
+
+<Backend "puppet-storeconfigs">
+       <Connection "puppet">
+               DBAdapter "pgsql"
+               DBName "puppet"
+               DBServer "puppet.domain.tld"
+               DBPort "5432"
+               DBUser "puppet"
+               DBPassword "secret1"
+               DBIOption "name" "value"
+       </Connection>
+</Backend>
+