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:
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user