This article will show you how to install SABnzbd. SABnzbd can be used to download binary files from Usenet servers.
You'll need to execute some commands via SSH to install this software. There is a separate guide on how to connect to your slot via SSH. Commands are kept as simple as possible and in most cases will simply need to be copied and pasted into the terminal window (then executed by pressing the Enter key).
Install SABnzbd by logging in via SSH, then copying and pasting the following:
wget -qO ~/SABnzbd.tar.gz $(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep 'browser_' | cut -d\" -f4 | grep src) tar xf ~/SABnzbd.tar.gz pip install --user sabyenc rm ~/SABnzbd.tar.gz
Starting, stopping and restarting
This section covers the SABnzbd process - starting it, stopping it and restarting it. It also covers checking if the process is running, in case that becomes necessary.
Replace port in the commands below with a port number between 10000 and 30000. Try to be as consistent as possible - if you change the port, you'll also need to change your proxypass configuration (if appropriate).
- screen -fa -dmS sabnzbd python ~/SABnzbd-*/SABnzbd.py --browser 0 --server $(hostname -f):port
- check running
- pgrep -fu "$(whoami)" "sabnzbd"
- kill "$(pgrep -fu "$(whoami)" "sabnzbd")"
- kill "$(pgrep -fu "$(whoami)" "sabnzbd")" && screen -fa -dmS sabnzbd python ~/SABnzbd-*/SABnzbd.py --browser 0 --server $(hostname -f):port
- kill (force stop)
- kill -9 "$(pgrep -fu "$(whoami)" "sabnzbd")"
The check running command will return a process number if SABnzbd is running. If it doesn't return anything, SABnzbd is not running.
Automatically restarting SABnzbd if it is not running
Cron jobs can be used to check if SABnzbd is running and start it up if it is not. There is a separate page on configuring cron jobs.
kill -9 "$(pgrep -fu "$(whoami)" "sabnzbd")" rm -rf ~/SABnzbd-* ~/.sabnzbd