1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 17:43:13 +02:00

Install a systemd service file on Linux.

This commit is contained in:
Sadie Powell
2024-03-04 15:27:26 +00:00
parent d68ba1b570
commit 0d149ce195
2 changed files with 25 additions and 0 deletions
+8
View File
@@ -29,6 +29,14 @@ endforeach()
# If not on Windows, generate anoperc and install it along with mydbgen
if(NOT WIN32)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
configure_file(${Anope_SOURCE_DIR}/src/tools/anope.service.in ${Anope_BINARY_DIR}/src/tools/anope.service)
install(
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/anope.service
DESTINATION ${BIN_DIR}
)
endif()
configure_file(${Anope_SOURCE_DIR}/src/tools/anoperc.in ${Anope_BINARY_DIR}/src/tools/anoperc)
install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/anoperc
DESTINATION ${BIN_DIR}
+17
View File
@@ -0,0 +1,17 @@
[Unit]
After=network.target
Description=Anope IRC Services
Documentation=https://wiki.anope.org/
After=network-online.target
Wants=network-online.target
[Service]
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=@BIN_DIR@/@PROGRAM_NAME@ --nofork
Restart=on-failure
Type=simple
WorkingDirectory=@CMAKE_INSTALL_PREFIX@
[Install]
WantedBy=multi-user.target