Skip to content

Commit

Permalink
Several path-related fixes for building.
Browse files Browse the repository at this point in the history
 - Config file installs to correct location.
 - Workdir placed into prefix.
 - Default config uses daemon mode.
  • Loading branch information
Seth Hall committed Mar 28, 2014
1 parent 6fb3c84 commit 4926747
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Expand Up @@ -48,11 +48,12 @@ include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})

add_subdirectory(src)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/etc/timemachine.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/etc/timemachine.cfg)

include(InstallPackageConfigFile)

InstallPackageConfigFile(
${CMAKE_CURRENT_SOURCE_DIR}/etc/timemachine.cfg
${CMAKE_CURRENT_BINARY_DIR}/etc/timemachine.cfg
${ETC}
timemachine.cfg)

Expand Down
3 changes: 2 additions & 1 deletion configure
Expand Up @@ -75,7 +75,8 @@ while [ $# -ne 0 ]; do
builddir=$optarg
;;
--prefix=*)
append_cache_entry CMAKE_INSTALL_PREFIX PATH $optarg
prefix=$optarg
append_cache_entry CMAKE_INSTALL_PREFIX PATH $prefix
;;
--conf-files-dir=*)
append_cache_entry BRO_ETC_INSTALL_DIR PATH $optarg
Expand Down
13 changes: 6 additions & 7 deletions etc/timemachine.cfg → etc/timemachine.cfg.in
Expand Up @@ -6,20 +6,19 @@ main {

## Directories for packet captures, logs, and indexes.
## These directories must exist when timemachine starts!
workdir "/var/timemachine";
indexdir "indexes/";
queryfiledir "queries/";
workdir "@CMAKE_INSTALL_PREFIX@/var/tm";
indexdir "@CMAKE_INSTALL_PREFIX@/indexes";
queryfiledir "@CMAKE_INSTALL_PREFIX@/queries";

## Name for the log to be stored in <workdir>
logfile "timemachine.log";

## Set this value to '1' if you'd like timemachine to
## start in daemon mode.
daemon 0;
daemon 1;
## If you are running in daemon mode, this setting
## MUST be set to '0'
console 1;

console 0;

## How often in seconds timemachine should log statistical
## information.
Expand Down Expand Up @@ -60,4 +59,4 @@ class "all" {
disk 50g;
filesize 128m;
mem 1g;
}
}

0 comments on commit 4926747

Please sign in to comment.