From d96c9d96c2ed698af3b02087194f77b3e5597228 Mon Sep 17 00:00:00 2001 From: Ted Lee Date: Sun, 7 Jun 2015 15:20:15 +0800 Subject: [PATCH] Created Setting up qBittorrent as a daemon on CentOS 7 (markdown) --- ...-up-qBittorrent-as-a-daemon-on-CentOS-7.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Setting-up-qBittorrent-as-a-daemon-on-CentOS-7.md diff --git a/Setting-up-qBittorrent-as-a-daemon-on-CentOS-7.md b/Setting-up-qBittorrent-as-a-daemon-on-CentOS-7.md new file mode 100644 index 0000000..3d2abe2 --- /dev/null +++ b/Setting-up-qBittorrent-as-a-daemon-on-CentOS-7.md @@ -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 **\** to the user you want to run qbittorrent with +``` + [Unit] + Description=qbittorrent torrent server + + [Service] + User= + 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 \ No newline at end of file