summary refs log tree commit diff
path: root/pkgs/tools/misc/ckb-next/systemd-service.patch
blob: 917bc09627f7633cf1caddcfa34f448e813b26ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
index 09056a7..72a7249 100644
--- a/src/daemon/CMakeLists.txt
+++ b/src/daemon/CMakeLists.txt
@@ -249,12 +249,7 @@ elseif (LINUX)
     # but it is not enabled by default and systemd is used instead. (Ubuntu 15.04+)
 
     # A way to check for upstart
-    execute_process(
-        COMMAND initctl --version
-        OUTPUT_VARIABLE initctl_output
-        OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-    if ("${initctl_output}" MATCHES "upstart")
+    if (FALSE)
         message(STATUS "upstart detected")
         set(CKB_NEXT_INIT_SYSTEM "upstart" CACHE INTERNAL "")
         set(DISALLOW_SYSVINIT TRUE)
@@ -292,7 +287,7 @@ elseif (LINUX)
     endif ()
 
     # A way to check for systemd
-    if (EXISTS "/run/systemd/system")
+    if (TRUE)
         message(STATUS "systemd detected")
         set(CKB_NEXT_INIT_SYSTEM "systemd" CACHE INTERNAL "")
         set(DISALLOW_SYSVINIT TRUE)
@@ -328,7 +323,7 @@ elseif (LINUX)
     endif ()
 
     # A way to check for OpenRC
-    if (EXISTS "/run/openrc/softlevel")
+    if (FALSE)
         message(STATUS "OpenRC detected")
         set(CKB_NEXT_INIT_SYSTEM "OpenRC" CACHE INTERNAL "")
         set(DISALLOW_SYSVINIT TRUE)
@@ -419,7 +414,7 @@ if ("${CKB_NEXT_INIT_SYSTEM}" STREQUAL "launchd")
 elseif ("${CKB_NEXT_INIT_SYSTEM}" STREQUAL "systemd")
     install(
         FILES "${CMAKE_CURRENT_BINARY_DIR}/service/ckb-next-daemon.service"
-        DESTINATION "/usr/lib/systemd/system"
+        DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/systemd/system"
         PERMISSIONS
         OWNER_READ OWNER_WRITE
         GROUP_READ