diff options
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | ouroboros.service.in | 2 | ||||
-rw-r--r-- | src/irmd/main.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b030d3f..75645319 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,6 +135,11 @@ if (SYSTEMD_FOUND) endif () if (NOT ${SYSTEMD_UNITDIR} STREQUAL "") message(STATUS "Installing systemd service in: ${SYSTEMD_UNITDIR}") + if (LIBTOML_LIBRARIES AND NOT DISABLE_CONFIGFILE) + set (CONFIGURE_STRING "--config ${OUROBOROS_CONFIG_DIR}${OUROBOROS_CONFIG_FILE}") + else () + set (CONFIGURE_STRING "") + endif () configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ouroboros.service.in" "${CMAKE_CURRENT_BINARY_DIR}/ouroboros.service" @ONLY) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ouroboros.service" diff --git a/ouroboros.service.in b/ouroboros.service.in index d84b02c5..5db996e1 100644 --- a/ouroboros.service.in +++ b/ouroboros.service.in @@ -2,7 +2,7 @@ Description=Ouroboros IPC Resource Manager Daemon [Service] -ExecStart=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_SBINDIR@/irmd +ExecStart=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_SBINDIR@/irmd @CONFIGURE_STRING@ User=root [Install] diff --git a/src/irmd/main.c b/src/irmd/main.c index 4b73a44e..f9423f4b 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -2689,7 +2689,7 @@ static void irm_argparse(int argc, char ** argv) { #ifdef HAVE_TOML - irmd.cfg_file = OUROBOROS_CONFIG_DIR OUROBOROS_CONFIG_FILE; + irmd.cfg_file = NULL; #endif argc--; argv++; |