Skip to content

Instantly share code, notes, and snippets.

@cobrce
Last active February 3, 2021 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cobrce/f163758f98ead818a657272afc3d2f9b to your computer and use it in GitHub Desktop.
Save cobrce/f163758f98ead818a657272afc3d2f9b to your computer and use it in GitHub Desktop.
install+autostart sonarr 2 in raspberry pi
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493
echo "deb http://apt.sonarr.tv/ master main" | sudo tee /etc/apt/sources.list.d/sonarr.list
sudo apt update
sudo apt install nzbdrone -y
sudo cat << EOF > /etc/systemd/system/sonarr.service
[Unit]
Description=Sonarr Daemon
After=network.target
[Service]
# Change and/or create the required user and group.
User=pi
Group=pi
# The UMask parameter controls the permissions of folders and files created.
#UMask=002
# The -data=/path argument can be used to force the config/db folder
ExecStart=/usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe -nobrowser
Type=simple
TimeoutStopSec=20
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
sudo chown pi:pi -R /opt/NzbDrone
sudo systemctl enable sonarr
read -p "Start sonarr? (Y/n) " -n 1 -r
echo # (optional) move to a new line
if [[ ! $REPLY =~ ^[Nn]$ ]]
then
sudo systemctl start sonarr
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment