Use APPSERVER_PROBE_NAME for the service name
This commit is contained in:
parent
4e8f4d4c97
commit
7d3623fab3
|
@ -21,8 +21,12 @@
|
||||||
#include <System/App.h>
|
#include <System/App.h>
|
||||||
#include "rrd.h"
|
#include "rrd.h"
|
||||||
#include "damon.h"
|
#include "damon.h"
|
||||||
|
#include "../config.h"
|
||||||
|
|
||||||
/* constants */
|
/* constants */
|
||||||
|
#ifndef APPSERVER_PROBE_NAME
|
||||||
|
# define APPSERVER_PROBE_NAME PACKAGE
|
||||||
|
#endif
|
||||||
#ifndef PROGNAME_DAMON
|
#ifndef PROGNAME_DAMON
|
||||||
# define PROGNAME_DAMON "DaMon"
|
# define PROGNAME_DAMON "DaMon"
|
||||||
#endif
|
#endif
|
||||||
|
@ -113,8 +117,8 @@ static AppClient * _refresh_connect(Host * host, Event * event)
|
||||||
{
|
{
|
||||||
if(setenv("APPSERVER_Probe", host->hostname, 1) != 0)
|
if(setenv("APPSERVER_Probe", host->hostname, 1) != 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if((host->appclient = appclient_new_event(NULL, "Probe", NULL, event))
|
if((host->appclient = appclient_new_event(NULL, APPSERVER_PROBE_NAME,
|
||||||
== NULL)
|
NULL, event)) == NULL)
|
||||||
error_print(PROGNAME_DAMON);
|
error_print(PROGNAME_DAMON);
|
||||||
return host->appclient;
|
return host->appclient;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
#include "../data/Probe.h"
|
#include "../data/Probe.h"
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
|
|
||||||
|
#ifndef APPSERVER_PROBE_NAME
|
||||||
|
# define APPSERVER_PROBE_NAME PACKAGE
|
||||||
|
#endif
|
||||||
#ifndef PROGNAME_PROBE
|
#ifndef PROGNAME_PROBE
|
||||||
# define PROGNAME_PROBE PACKAGE
|
# define PROGNAME_PROBE PACKAGE
|
||||||
#endif
|
#endif
|
||||||
|
@ -685,8 +688,9 @@ static int _probe(AppServerOptions options)
|
||||||
free(probe.volinfo);
|
free(probe.volinfo);
|
||||||
return _probe_error(1);
|
return _probe_error(1);
|
||||||
}
|
}
|
||||||
if((appserver = appserver_new_event(&probe, options, "Probe", NULL,
|
if((appserver = appserver_new_event(&probe, options,
|
||||||
event)) == NULL)
|
APPSERVER_PROBE_NAME, NULL, event))
|
||||||
|
== NULL)
|
||||||
{
|
{
|
||||||
free(probe.ifinfo);
|
free(probe.ifinfo);
|
||||||
free(probe.volinfo);
|
free(probe.volinfo);
|
||||||
|
|
|
@ -30,7 +30,7 @@ install=$(BINDIR)
|
||||||
depends=damon.h,rrd.h,../config.h
|
depends=damon.h,rrd.h,../config.h
|
||||||
|
|
||||||
[damon-backend.c]
|
[damon-backend.c]
|
||||||
depends=damon.h,rrd.h,damon-backend-app.c,damon-backend-salt.c
|
depends=damon.h,rrd.h,damon-backend-app.c,damon-backend-salt.c,../config.h
|
||||||
|
|
||||||
[damon-main.c]
|
[damon-main.c]
|
||||||
depends=damon.h
|
depends=damon.h
|
||||||
|
|
Loading…
Reference in New Issue
Block a user