+2005-12-17, Version 3.6.0
+ * A config file has been added. This allows for loading only specific
+ plugins.
+ * A `mysql' plugin has been added.
+ * A signal handler for SIGTERM has been added.
+
2005-12-07, Version 3.5.0 (Revision 326)
* A bug in the `load' module under Solaris has been fixed.
* The `users' module has been contributed by Sebastian Harl. It counts
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(collectd, 3.5.0)
+AC_INIT(collectd, 3.6.alpha0)
AC_CONFIG_SRCDIR(src/collectd.c)
AC_CONFIG_HEADERS(src/config.h)
AM_INIT_AUTOMAKE(dist-bzip2)
loop++;
}
+static void sigTermHandler (int signal)
+{
+ loop++;
+}
+
static int change_basedir (char *dir)
{
int dirlen = strlen (dir);
int main (int argc, char **argv)
{
- struct sigaction sigIntAction, sigChldAction;
+ struct sigaction sigIntAction;
+ struct sigaction sigTermAction;
+ struct sigaction sigChldAction;
char *configfile = CONFIGFILE;
char *plugindir = PLUGINDIR;
char *datadir = PKGLOCALSTATEDIR;
sigIntAction.sa_handler = sigIntHandler;
sigaction (SIGINT, &sigIntAction, NULL);
+ sigIntAction.sa_handler = sigTermHandler;
+ sigaction (SIGTERM, &sigTermAction, NULL);
+
sigChldAction.sa_handler = SIG_IGN;
sigaction (SIGCHLD, &sigChldAction, NULL);
#define BUFSIZE 512
-static char *host;
+static char *host = "localhost";
static char *user;
static char *pass;
static char *db = NULL;
if (getconnection () != NULL)
init_suceeded = 1;
else
+ {
+ syslog (LOG_ERR, "The `mysql' plugin will be disabled because `init' failed to connect to `%s'", host);
init_suceeded = 0;
+ }
#endif /* MYSQL_HAVE_READ */
return;