systemd-sysusers support and RPMSPEC added

This commit is contained in:
Syping 2024-03-12 09:40:58 +01:00
parent 6f6b5eaa69
commit 6a89203415
4 changed files with 77 additions and 2 deletions

View file

@ -89,8 +89,10 @@ endif()
if (UNIX AND NOT APPLE)
option(WITH_SYSTEMD "Build with systemd Support" OFF)
if (WITH_SYSTEMD)
configure_file(src/systemd/dtranslatebot.service.in "${dtranslatebot_BINARY_DIR}/systemd/dtranslatebot.service" @ONLY)
install(FILES "${dtranslatebot_BINARY_DIR}/systemd/dtranslatebot.service" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/systemd/system")
configure_file(src/systemd/dtranslatebot.service.in "${dtranslatebot_BINARY_DIR}/systemd/service/dtranslatebot.service" @ONLY)
configure_file(src/systemd/dtranslatebot.sysusersd.in "${dtranslatebot_BINARY_DIR}/systemd/sysusers.d/dtranslatebot.conf" @ONLY)
install(FILES "${dtranslatebot_BINARY_DIR}/systemd/service/dtranslatebot.service" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/systemd/system")
install(FILES "${dtranslatebot_BINARY_DIR}/systemd/sysusers.d/dtranslatebot.conf" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/sysusers.d")
endif()
endif()