Last active
February 3, 2021 00:10
-
-
Save cobrce/f163758f98ead818a657272afc3d2f9b to your computer and use it in GitHub Desktop.
install+autostart sonarr 2 in raspberry pi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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