Skip to content

Commit

Permalink
Use better defaults for installation locations
Browse files Browse the repository at this point in the history
These defaults assume the installation will be system wide either on
/usr or /usr/local prefix. If the user wants to separate the
installation completely from their system SYSCONFDIR, LOCALSTATEDIR,
GSAD_PID_DIR, GVM_RUN_DIR and SYSTEMD_SERVICE_DIR need to be adjusted.
  • Loading branch information
bjoernricks committed Jun 30, 2021
1 parent 3483c5c commit 0e0ae14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions gsad/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ else (CLANG_FORMAT)
endif (CLANG_FORMAT)

if (NOT SYSCONFDIR)
set (SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc")
set (SYSCONFDIR "/etc")
endif (NOT SYSCONFDIR)

if (NOT EXEC_PREFIX)
Expand All @@ -81,7 +81,7 @@ if (NOT LIBDIR)
endif (NOT LIBDIR)

if (NOT LOCALSTATEDIR)
set (LOCALSTATEDIR "${CMAKE_INSTALL_PREFIX}/var")
set (LOCALSTATEDIR "/var")
endif (NOT LOCALSTATEDIR)

if (NOT INCLUDEDIR)
Expand All @@ -96,11 +96,11 @@ set (GSAD_DATA_DIR "${DATADIR}/gvm/gsad")
set (GSAD_CONFIG_DIR "${SYSCONFDIR}/gvm/")

if (NOT GSAD_PID_DIR)
set (GSAD_PID_DIR "${LOCALSTATEDIR}/run")
set (GSAD_PID_DIR "/run")
endif (NOT GSAD_PID_DIR)

if (NOT GVM_RUN_DIR)
set (GVM_RUN_DIR "${LOCALSTATEDIR}/run")
set (GVM_RUN_DIR "/run")
endif (NOT GVM_RUN_DIR)

if (NOT GVM_STATE_DIR)
Expand Down
6 changes: 3 additions & 3 deletions gsad/config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@


if (NOT SYSTEMD_SERVICE_DIR)
set (SYSTEMD_SERVICE_DIR "${CMAKE_INSTALL_PREFIX}/lib/systemd/system")
set (SYSTEMD_SERVICE_DIR "/lib/systemd/system")
endif (NOT SYSTEMD_SERVICE_DIR)

if (NOT DEFAULT_CONFIG_DIR)
set (DEFAULT_CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/etc/default")
set (DEFAULT_CONFIG_DIR "${SYSCONFDIR}/default")
endif (NOT DEFAULT_CONFIG_DIR)

if (NOT LOGROTATE_DIR)
set (LOGROTATE_DIR "${CMAKE_INSTALL_PREFIX}/etc/logrotate.d")
set (LOGROTATE_DIR "${SYSCONFDIR}/logrotate.d")
endif (NOT LOGROTATE_DIR)

configure_file (gsad.service.in gsad.service)
Expand Down

0 comments on commit 0e0ae14

Please sign in to comment.