mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 10:37:06 -07:00
systemd service with user switch.
rm previous systemd unit service cmake now placing new file 'qbittorrent-nox@.service.in' systemd service now "Type=simple"
This commit is contained in:
parent
7302042daf
commit
e00c96df99
6 changed files with 20 additions and 17 deletions
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
|
Loading…
Add table
Add a link
Reference in a new issue