mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 02:36:15 +03:00
Created Setting up qBittorrent as a daemon on CentOS 7 (markdown)
parent
d4c7540f64
commit
d96c9d96c2
1 changed files with 35 additions and 0 deletions
35
Setting-up-qBittorrent-as-a-daemon-on-CentOS-7.md
Normal file
35
Setting-up-qBittorrent-as-a-daemon-on-CentOS-7.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Platform
|
||||
* CentOS 7_x64
|
||||
* systemctl
|
||||
|
||||
# Install
|
||||
Follow this guide https://github.com/qbittorrent/qBittorrent/wiki/Compiling-qbittorrent-nox-for-CentOS-from-source
|
||||
|
||||
# Creating a systemctl script
|
||||
1. Create a script so that we can control qbittorrent with systemctl
|
||||
`sudo vi /usr/lib/systemd/system/qbitorrent.service`
|
||||
2. Enter`i`to enter insert mode then paste the code below, change **\<username\>** to the user you want to run qbittorrent with
|
||||
```
|
||||
[Unit]
|
||||
Description=qbittorrent torrent server
|
||||
|
||||
[Service]
|
||||
User=<username>
|
||||
ExecStart=/usr/bin/qbittorrent-nox
|
||||
Restart=on-abort
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
3. Save the script
|
||||
Enter`:wq` then press enter to save the script
|
||||
4. reload systemctl, this will make systemd take notice of the new script
|
||||
`sudo systemctl daemon-reload`
|
||||
5. Start qbittorrent
|
||||
`sudo systemctl start qbittorrent`
|
||||
|
||||
# Start at boot
|
||||
`sudo systemctl enable qbittorrent`
|
||||
|
||||
# Source
|
||||
http://stackoverflow.com/a/26565328
|
Loading…
Reference in a new issue