(Grav GitSync) Automatic Commit from tanshu

This commit is contained in:
tanshu 2017-03-13 07:39:19 +00:00 committed by GitSync
commit 7a9630eb91
6 changed files with 348 additions and 0 deletions

120
pages/01.grav/default.md Normal file
View File

@ -0,0 +1,120 @@
---
---
# Grav
### Install
```sh
$ sudo add-apt-repository ppa:deluge-team/ppa
$ sudo apt update
$ sudo apt install deluge deluged deluge-web deluge-webui
```
### Verify Deluge Installion
Ensure Deluge daemon `deluged` and Web UI `deluge-web` are installed.
Use `which deluged` or `which deluge-web` to check installation path. If
they are not installed in the usual `/usr/bin` modify the service
file `ExecStart` lines to point to the correct location (e.g.
`/usr/local/bin/deluged`).
### User Management
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 `deluge`
group any users you wish to be able to easily manage or access files
downloaded through Deluge, for example:
```sh
sudo adduser --system --gecos "Deluge Service" --disabled-password --group --home /var/lib/deluge deluge
sudo adduser tanshu deluge
```
### Autostart with systemd
Create the file `/etc/systemd/system/deluged.service` containing the
following:
```sh
sudo nano /etc/systemd/system/deluged.service
```
```
[Unit]
Description=Deluge Bittorrent Client Daemon
After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=007
ExecStart=/usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning
Restart=on-failure
# Configures the time to wait before service is stopped forcefully.
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target
```
Enable the
service with:
```sh
systemctl enable /etc/systemd/system/deluged.service
systemctl start deluged
systemctl status deluged
```
## Deluge Web UI (deluge-web) Service
### Autostart with systemd
Create the file `/etc/systemd/system/deluge-web.service` containing the
following:
```sh
sudo nano /etc/systemd/system/deluge-web.service
```
```
[Unit]
Description=Deluge Bittorrent Client Web Interface
After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=027
ExecStart=/usr/bin/deluge-web -l /var/log/deluge/web.log -L warning
Restart=on-failure
[Install]
WantedBy=multi-user.target
```
Enable the service with:
```
systemctl enable /etc/systemd/system/deluge-web.service
systemctl start deluge-web
systemctl status deluge-web
```
## Logging
Create a log directory for Deluge and give the service user (e.g.
`deluge`), full access:
```sh
$ sudo mkdir -p /var/log/deluge
$ sudo chown -R deluge:deluge/var/log/deluge
$ sudo chmod -R 750 /var/log/deluge
```
- The deluge log directory is now configured so that user deluge has
full access, group deluge read only and everyone else denied access. The
umask specified in the services sets the permission of new log files.
See Deluge Logging for all available log-levels.
### Log Rotation
To enable log rotation create `/etc/logrotate.d/deluge` with the following code:
```
/var/log/deluge/*.log {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
systemctl restart deluged >/dev/null 2>&1 || true
systemctl restart deluge-web >/dev/null 2>&1 || true
endscript
}
```
### Open Browser
`http://localhost:8112`

117
pages/02.deluge/default.md Normal file
View File

@ -0,0 +1,117 @@
# Deluge
### Install
```sh
$ sudo add-apt-repository ppa:deluge-team/ppa
$ sudo apt update
$ sudo apt install deluge deluged deluge-web deluge-webui
```
### Verify Deluge Installion
Ensure Deluge daemon `deluged` and Web UI `deluge-web` are installed.
Use `which deluged` or `which deluge-web` to check installation path. If
they are not installed in the usual `/usr/bin` modify the service
file `ExecStart` lines to point to the correct location (e.g.
`/usr/local/bin/deluged`).
### User Management
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 `deluge`
group any users you wish to be able to easily manage or access files
downloaded through Deluge, for example:
```sh
sudo adduser --system --gecos "Deluge Service" --disabled-password --group --home /var/lib/deluge deluge
sudo adduser tanshu deluge
```
### Autostart with systemd
Create the file `/etc/systemd/system/deluged.service` containing the
following:
```sh
sudo nano /etc/systemd/system/deluged.service
```
```
[Unit]
Description=Deluge Bittorrent Client Daemon
After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=007
ExecStart=/usr/bin/deluged -d -l /var/log/deluge/daemon.log -L warning
Restart=on-failure
# Configures the time to wait before service is stopped forcefully.
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target
```
Enable the
service with:
```sh
systemctl enable /etc/systemd/system/deluged.service
systemctl start deluged
systemctl status deluged
```
## Deluge Web UI (deluge-web) Service
### Autostart with systemd
Create the file `/etc/systemd/system/deluge-web.service` containing the
following:
```sh
sudo nano /etc/systemd/system/deluge-web.service
```
```
[Unit]
Description=Deluge Bittorrent Client Web Interface
After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=027
ExecStart=/usr/bin/deluge-web -l /var/log/deluge/web.log -L warning
Restart=on-failure
[Install]
WantedBy=multi-user.target
```
Enable the service with:
```
systemctl enable /etc/systemd/system/deluge-web.service
systemctl start deluge-web
systemctl status deluge-web
```
## Logging
Create a log directory for Deluge and give the service user (e.g.
`deluge`), full access:
```sh
$ sudo mkdir -p /var/log/deluge
$ sudo chown -R deluge:deluge/var/log/deluge
$ sudo chmod -R 750 /var/log/deluge
```
- The deluge log directory is now configured so that user deluge has
full access, group deluge read only and everyone else denied access. The
umask specified in the services sets the permission of new log files.
See Deluge Logging for all available log-levels.
### Log Rotation
To enable log rotation create `/etc/logrotate.d/deluge` with the following code:
```
/var/log/deluge/*.log {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
systemctl restart deluged >/dev/null 2>&1 || true
systemctl restart deluge-web >/dev/null 2>&1 || true
endscript
}
```
### Open Browser
`http://localhost:8112`

View File

@ -0,0 +1,43 @@
# CouchPoato
### Clone the CouchPotato GitHub Repo
Run `git clone https://github.com/CouchPotato/CouchPotatoServer.git /opt/CouchPotato`
### User Management
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 `couchpotato` group any users you wish to be able to easily manage or access files downloaded through Deluge, for example:
```sh
sudo adduser --system --gecos "Couch Potato Service" --disabled-password --group --home /var/lib/couchpotato couchpotato
sudo adduser tanshu couchpotato
```
### Autostart with systemd
Create the file `/etc/systemd/system/couch-potato.service` containing the following:
```sh
sudo nano /etc/systemd/system/couch-potato.service
```
```
[Unit]
Description=Couch Potato Daemon
After=syslog.target network.target
[Service]
User=couchpotato
Group=couchpotato
Type=simple
ExecStart=/usr/bin/python /opt/CouchPotato/CouchPotato.py
TimeoutStopSec=20
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
```
Enable the service with:
```
systemctl enable /etc/systemd/system/couch-potato.service
systemctl start couch-potato
systemctl status couch-potato
```
### Finally
Open your browser and go to: http://localhost:5050/

View File

@ -0,0 +1,42 @@
# PlexPy
### Clone the CouchPotato GitHub Repo
Run `git clone https://github.com/JonnyWong16/plexpy.git /opt/PlexPy`
### User Management
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 `plexpy` group any users you wish to be able to easily manage or access files downloaded through Deluge, for example:
```sh
sudo adduser --system --gecos "PlexPy Service" --disabled-password --group --home /var/lib/plexpy plexpy
sudo adduser tanshu plexpy
```
### Autostart with systemd
Create the file `/etc/systemd/system/plexpy.service` containing the following:
```sh
sudo nano /etc/systemd/system/plexpy.service
```
```
[Unit]
Description=PlexPy Daemon
After=network.target
[Service]
User=plexpy
Group=plexpy
Type=simple
ExecStart=/opt/PlexPy/PlexPy.py --quiet --daemon --nolaunch --config /etc/plexpy/config.ini --datadir /var/lib/plexpy
GuessMainPID=no
Type=forking
[Install]
WantedBy=multi-user.target
```
Enable the service with:
```
systemctl enable /etc/systemd/system/plexpy.service
systemctl start plexpy
systemctl status plexpy
```
### Finally
Open your browser and go to: http://localhost:8181/

View File

@ -0,0 +1,26 @@
# Sonarr
### Add Sonarr's repository to your software source
``` sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
FDA5DFFC echo "deb http://apt.sonarr.tv/ master main" | sudo tee
/etc/apt/sources.list.d/sonarr.list ```
### Install/Update Sonarr
```sh sudo apt update sudo apt install nzbdrone ```
### User Management
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```
group any users you wish to be able to easily manage or access files
downloaded through Deluge, for example: ```sh sudo adduser --system
--gecos "Sonarr Service" --disabled-password --group --home
/var/lib/sonarr sonarr sudo adduser tanshu sonarr ```
### Autostart with systemd
Create the file `/etc/systemd/system/sonarr.service` containing the
following: ```sh sudo nano /etc/systemd/system/sonarr.service ``` ```
[Unit] Description=Sonarr Daemon 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: ``` systemctl enable
/etc/systemd/system/sonarr.service systemctl start sonarr systemctl
status sonarr ```
### Open Browser
`http://localhost:8989`

0
pages/index.html Normal file
View File