mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 10:28:32 +00:00
build: support different install prefixes for daemon service file (#7571)
* build: support different install prefixes for daemon service file * code review: add `@ONLY`
This commit is contained in:
@@ -42,20 +42,20 @@ tr_win32_app_info(${TR_NAME}-daemon
|
||||
"${TR_NAME}-daemon"
|
||||
"${TR_NAME}-daemon.exe")
|
||||
|
||||
foreach(P daemon)
|
||||
install(
|
||||
TARGETS ${TR_NAME}-${P}
|
||||
TARGETS ${TR_NAME}-daemon
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
if(INSTALL_DOC)
|
||||
install(
|
||||
FILES ${TR_NAME}-${P}.1
|
||||
FILES ${TR_NAME}-daemon.1
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
endif()
|
||||
|
||||
if (WITH_SYSTEMD)
|
||||
configure_file("${TR_NAME}-daemon.service.in" "${TR_NAME}-daemon.service" @ONLY)
|
||||
|
||||
install(
|
||||
FILES ${TR_NAME}-${P}.service
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/${TR_NAME}-daemon.service"
|
||||
DESTINATION lib/systemd/system)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
Description=Transmission BitTorrent Daemon
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
Documentation=man:transmission-daemon(1)
|
||||
Documentation=man:@TR_NAME@-daemon(1)
|
||||
|
||||
[Service]
|
||||
User=transmission
|
||||
Type=notify
|
||||
ExecStart=/usr/bin/transmission-daemon -f --log-level=error
|
||||
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/@TR_NAME@-daemon -f --log-level=error
|
||||
ExecReload=/bin/kill -s HUP $MAINPID
|
||||
|
||||
# Hardening
|
||||
Reference in New Issue
Block a user