Skip to content

Instantly share code, notes, and snippets.

@cobrce
Created February 3, 2021 00:00
Show Gist options
  • Save cobrce/c42aa35efcfcfd846ceda465fc05100b to your computer and use it in GitHub Desktop.
Save cobrce/c42aa35efcfcfd846ceda465fc05100b to your computer and use it in GitHub Desktop.
install+autostart qbittorrent-nox in raspberry pi
sudo apt install qbittorrent-nox -y
sudo cat << EOF > /etc/systemd/system/qbittorrent.service
[Unit]
Description=qBittorrent
After=network.target
[Service]
Type=forking
User=pi
Group=pi
UMask=002
ExecStart=/usr/bin/qbittorrent-nox -d --webui-port=8080
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable qbittorrent
read -p "Start qbittorrent? (Y/n) " -n 1 -r
echo # (optional) move to a new line
if [[ ! $REPLY =~ ^[Nn]$ ]]
then
sudo systemctl start qbittorrent
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment