parent
95192a8e3e
commit
9275501fcf
1 changed files with 60 additions and 0 deletions
@ -0,0 +1,60 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
########################## |
||||
# Script to install usenet utilities |
||||
# - Sabnzb (usenet download client) |
||||
# - Sonarr (Find and Manage TV Shows) |
||||
# - Radarr (Find and Manage Movies) |
||||
########################## |
||||
|
||||
# Header for this script |
||||
TITLE="Usenet_Setup" |
||||
LOGFILE=/tmp/$TITLE.log |
||||
DEPTH=2 |
||||
if [[ $DEPTH == 0 ]]; then |
||||
TAGSTR="-->" |
||||
elif [[ $DEPTH == 1 ]]; then |
||||
TAGSTR="--->" |
||||
elif [[ $DEPTH == 2 ]]; then |
||||
TAGSTR="----->" |
||||
elif [[ $DEPTH == 3 ]]; then |
||||
TAGSTR="------>" |
||||
fi |
||||
echo "$TAGSTR ====== $TITLE (Logged to $LOGFILE) ======" |
||||
|
||||
# Install and config sabnzb. |
||||
echo "$TAGSTR Installing and configuring sabnzb" |
||||
yaourt -S sabnzbd python2-pyopenssl --noconfirm --needed > $LOGFILE 2>&1 |
||||
cp /tmp/usenet/sabnzbd.ini /opt/sabnzbd/sabnzbd.ini |
||||
|
||||
# Start sanbznd up |
||||
echo "$TAGSTR Starting sabnzb" |
||||
systemctl start sabnzbd |
||||
systemctl enable sabnzbd |
||||
|
||||
# Install and config sonarr. |
||||
echo "$TAGSTR Installing and configuring sonarr" |
||||
yaourt -S libmediainfo mono sqlite sonarr --noconfirm --needed > $LOGFILE 2>&1 |
||||
mkdir /usr/lib/sonarr |
||||
mkdir /var/lib/sonarr |
||||
tar -xzf /tmp/usenet/NzbDrone.tar.gz -C /tmp/usenet/ > $LOGFILE 2>&1 |
||||
mv -f /tmp/usenet/NzbDrone/* /var/lib/sonarr |
||||
chown -R sonarr:sonarr /usr/lib/sonarr |
||||
chown -R sonarr:sonarr /var/lib/sonarr |
||||
|
||||
# Start up Sonarr. |
||||
echo "$TAGSTR Starting sonarr" |
||||
systemctl start sonarr |
||||
systemctl enable sonarr |
||||
|
||||
# Install Radarr |
||||
echo "$TAGSTR Installing and configuring radarr" |
||||
yaourt -S radarr --noconfirm --needed > $LOGFILE 2>&1 |
||||
|
||||
# Start up radarr. |
||||
echo "$TAGSTR Starting radarr" |
||||
systemctl start radarr |
||||
systemctl enable radarr |
||||
|
||||
# Lastly, say we are done. |
||||
echo "$TAGSTR Completed $TITLE" |
Loading…
Reference in new issue