Update 'pages/05.sonarr/docs.md'

Properly formateed the Sonarr docs
This commit is contained in:
Amritanshu Agrawal 2017-03-16 05:19:37 +00:00
parent 6bdef40557
commit 3bf3378724
1 changed files with 41 additions and 16 deletions

View File

@ -7,27 +7,52 @@ order_manual: ''
# Sonarr # Sonarr
### Add Sonarr's repository to your software source ### Add Sonarr's repository to your software source
``` sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ```sh
FDA5DFFC echo "deb http://apt.sonarr.tv/ master main" | sudo tee sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FDA5DFFC
/etc/apt/sources.list.d/sonarr.list ``` echo "deb http://apt.sonarr.tv/ master main" | sudo tee /etc/apt/sources.list.d/sonarr.list
```
### Install/Update Sonarr ### Install/Update Sonarr
```sh sudo apt update sudo apt install nzbdrone ``` ```sh
sudo apt update
sudo apt install nzbdrone
```
### User Management ### User Management
For security it is best to run a service with a specific user and group. For security it is best to run a service with a specific user and group.
You can create one using the following command: Add to the ```sonarr``` You can create one using the following command: Add to the `sonarr`
group any users you wish to be able to easily manage or access files group any users you wish to be able to easily manage or access files
downloaded through Deluge, for example: ```sh sudo adduser --system downloaded through Deluge, for example:
--gecos "Sonarr Service" --disabled-password --group --home ```sh
/var/lib/sonarr sonarr sudo adduser tanshu sonarr ``` sudo adduser --system --gecos "Sonarr Service" --disabled-password --group --home /var/lib/sonarr sonarr
sudo adduser tanshu sonarr
```
### Autostart with systemd ### Autostart with systemd
Create the file `/etc/systemd/system/sonarr.service` containing the Create the file `/etc/systemd/system/sonarr.service` containing the
following: ```sh sudo nano /etc/systemd/system/sonarr.service ``` ``` following:
[Unit] Description=Sonarr Daemon After=syslog.target network.target ```sh
[Service] User=sonarr Group=sonarr Type=simple ExecStart=/usr/bin/mono sudo nano /etc/systemd/system/sonarr.service
--debug /opt/NzbDrone/NzbDrone.exe -nobrowser TimeoutStopSec=20 ```
KillMode=process Restart=on-failure [Install] WantedBy=multi-user.target ```
``` Enable the service with: ``` systemctl enable [Unit]
/etc/systemd/system/sonarr.service systemctl start sonarr systemctl Description=Sonarr Daemon
status sonarr ``` After=syslog.target network.target
[Service]
User=sonarr
Group=sonarr
Type=simple
ExecStart=/usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe -nobrowser TimeoutStopSec=20
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
```
Enable the service with:
```sh
sudo systemctl enable /etc/systemd/system/sonarr.service
sudo systemctl start sonarr
systemctl status sonarr
```
### Open Browser ### Open Browser
`http://localhost:8989` `http://localhost:8989`