Building CouchPotato on CentOS 7

Building CouchPotato is not too different to building Sick Beard, but a minor tweak needs to be made to the init script to point to the directory where this script installs it, as I prefer to stick things in /opt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

## Install Prerequisites
yum install python git -y

## Install Couchpotato
adduser couchpotato
cd /opt/
git clone git://github.com/RuudBurger/CouchPotatoServer.git couchpotato
chown -R couchpotato:couchpotato couchpotato/
cp couchpotato/init/couchpotato.fedora.service /etc/systemd/system/couchpotato.service

## Fix the Startup Script to point to the /opt/ directory (this is all one line)
sed -i 's\ExecStart=/var/lib/CouchPotatoServer/CouchPotato.py -- daemon\ExecStart=/opt/couchpotato/CouchPotato.py --daemon\g' /etc/systemd/system/couchpotato.service

## Firewall Configuration
firewall-cmd --permanent --zone=internal --add-port=5050/tcp
firewall-cmd --reload

## Enable & Start the Service
systemctl enable couchpotato
systemctl start couchpotato

exit 0