SRCS += htsclient.c
-PROG = tvhead
+PROG = tvheadend
CFLAGS += -g -Wall -Werror -O2
-CFLAGS += -I$(INCLUDES_INSTALL_BASE)
+CFLAGS += -I$(INCLUDES_INSTALL_BASE) $(HTS_CFLAGS)
CFLAGS += -Wno-deprecated-declarations
CFLAGS += -D_LARGEFILE64_SOURCE
CFLAGS += -DENABLE_INPUT_IPTV -DENABLE_INPUT_DVB
#include "pvr.h"
#include "dispatch.h"
#include "iptv_output.h"
+#include "config.h"
int running;
int xmltvreload;
const char *groupnam = NULL;
char *cfgfile;
int logfacility = LOG_DAEMON;
-
-
+ int r;
signal(SIGPIPE, handle_sigpipe);
}
}
- config_read_file(cfgfile);
+ if((r = config_read_file(cfgfile)) < 0) {
+ fprintf(stderr,
+ "configfile \"%s\" not found, trying from build structure\n",
+ cfgfile);
+
+ cfgfile = HTS_BUILD_ROOT "/etc/tvheadend.cfg";
+ r = config_read_file(cfgfile);
+ }
+
+
+ if(r < 0)
+ fprintf(stderr,
+ "configfile \"%s\" not found, running with defaults\n",
+ cfgfile);
+ else
+ fprintf(stderr, "Config from \"%s\" loaded\n", cfgfile);
if(forkaway) {
if(daemon(0, 0)) {