Skip to content

Commit

Permalink
Handle SysVinit in the uninstall target
Browse files Browse the repository at this point in the history
  • Loading branch information
xrogaan committed Oct 24, 2019
1 parent e35a118 commit 22e20c1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmake/cmake_uninstall.cmake.in
Expand Up @@ -155,6 +155,15 @@ elseif ("${init_system}" STREQUAL "OpenRC")
endforeach()
endif()

elseif ("${init_system}" STREQUAL "SysVinit")

message(STATUS "${init_system}: stopping and disabling ${daemon}")
execute_process(COMMAND sudo service ckb-next-daemon.sh stop)
find_program(UPDATE_RC_EXISTS "update-rc.d")
if (UPDATE_RC_EXISTS)
execute_process(COMMAND sudo update-rc.d ckb-next-daemon.sh remove)
endif ()

else ()
message(WARNING "Init system was not detected.
Either there's a bug, or your init system is not supported.")
Expand Down

0 comments on commit 22e20c1

Please sign in to comment.