mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-22 17:26:21 +03:00
Merge pull request #6806 from Anton-Latukha/master
Work on Systemd service unit
This commit is contained in:
commit
8150805312
6 changed files with 20 additions and 17 deletions
4
configure
vendored
4
configure
vendored
|
@ -6689,7 +6689,7 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
|
|||
fi
|
||||
|
||||
if test "x$enable_systemd" = "xyes"; then :
|
||||
ac_config_files="$ac_config_files dist/unix/systemd/qbittorrent-nox.service"
|
||||
ac_config_files="$ac_config_files dist/unix/systemd/qbittorrent-nox@.service"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
|
@ -7443,7 +7443,7 @@ do
|
|||
case $ac_config_target in
|
||||
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
||||
"conf.pri") CONFIG_FILES="$CONFIG_FILES conf.pri" ;;
|
||||
"dist/unix/systemd/qbittorrent-nox.service") CONFIG_FILES="$CONFIG_FILES dist/unix/systemd/qbittorrent-nox.service" ;;
|
||||
"dist/unix/systemd/qbittorrent-nox@.service") CONFIG_FILES="$CONFIG_FILES dist/unix/systemd/qbittorrent-nox@.service" ;;
|
||||
|
||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||
esac
|
||||
|
|
|
@ -218,7 +218,7 @@ AC_SUBST(QBT_REMOVE_DEFINES)
|
|||
|
||||
AC_OUTPUT(conf.pri)
|
||||
AS_IF([test "x$enable_systemd" = "xyes"],
|
||||
[AC_OUTPUT(dist/unix/systemd/qbittorrent-nox.service)])
|
||||
[AC_OUTPUT(dist/unix/systemd/qbittorrent-nox@.service)])
|
||||
|
||||
|
||||
|
||||
|
|
4
dist/unix/CMakeLists.txt
vendored
4
dist/unix/CMakeLists.txt
vendored
|
@ -2,8 +2,8 @@ if (SYSTEMD)
|
|||
find_package(Systemd)
|
||||
if (SYSTEMD_FOUND)
|
||||
set(EXPAND_BINDIR ${CMAKE_INSTALL_FULL_BINDIR})
|
||||
configure_file(systemd/qbittorrent-nox.service.in ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox.service @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox.service
|
||||
configure_file(systemd/qbittorrent-nox@.service.in ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service
|
||||
DESTINATION ${SYSTEMD_SERVICES_INSTALL_DIR}
|
||||
COMPONENT data)
|
||||
endif(SYSTEMD_FOUND)
|
||||
|
|
11
dist/unix/systemd/qbittorrent-nox.service.in
vendored
11
dist/unix/systemd/qbittorrent-nox.service.in
vendored
|
@ -1,11 +0,0 @@
|
|||
[Unit]
|
||||
Description=qBittorrent Daemon Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
User=1000
|
||||
ExecStart=@EXPAND_BINDIR@/qbittorrent-nox -d
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
14
dist/unix/systemd/qbittorrent-nox@.service.in
vendored
Normal file
14
dist/unix/systemd/qbittorrent-nox@.service.in
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=qBittorrenti-nox service for user %I
|
||||
|
||||
Documentation=man:qbittorrent-nox(1)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
PrivateTmp=false
|
||||
User=%i
|
||||
ExecStart=@EXPAND_BINDIR@/qbittorrent-nox
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -29,7 +29,7 @@ DIST_PATH = ../dist/unix
|
|||
|
||||
# Systemd Service file
|
||||
nogui:systemd {
|
||||
systemdService.files = $$DIST_PATH/systemd/qbittorrent-nox.service
|
||||
systemdService.files = $$DIST_PATH/systemd/qbittorrent-nox@.service
|
||||
systemdService.path = $$PREFIX/lib/systemd/system/
|
||||
INSTALLS += systemdService
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue