Skip to content

Commit

Permalink
Use systemctl binary to detect systemd
Browse files Browse the repository at this point in the history
Fixes #91
  • Loading branch information
roehling committed Mar 4, 2019
1 parent f10fb9e commit a483cb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -21,7 +21,7 @@ find_program(BASE64 base64 DOC "path to base64 executable")
find_program(OPENSSL openssl DOC "path to OpenSSL executable")
find_program(INSSERV insserv DOC "path to insserv executable")
find_program(CHKCONFIG chkconfig DOC "path to chkconfig executable")
find_program(SYSTEMD systemd)
find_program(SYSTEMCTL systemctl DOC "path to systemctl executable")
find_library(LIBSOCKET socket)
find_library(LIBNSL nsl)

Expand Down Expand Up @@ -66,7 +66,7 @@ check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
add_definitions(-DSIZEOF_UNSIGNED_LONG=${SIZEOF_UNSIGNED_LONG})

if(NOT DEFINED INIT_FLAVOR)
if(SYSTEMD)
if(SYSTEMCTL)
message(STATUS "Detected init flavor: systemd")
set(INIT_FLAVOR "systemd" CACHE STRING "Init daemon of this system")
elseif(IS_DIRECTORY "${SYSCONF_DIR}/init" AND EXISTS "/lib/init/upstart-job")
Expand Down

0 comments on commit a483cb4

Please sign in to comment.