Created
July 6, 2014 16:35
-
-
Save abn/dc7e104d75fea45c7308 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
if [ "$(whoami)" != "root" ]; then | |
echo "This script needs to be run as root." | |
exit 1 | |
fi | |
# Dependencues | |
yum install -y python git | |
# Couchpotato Setup | |
CP_GIT="https://github.com/RuudBurger/CouchPotatoServer.git" | |
CP_USER=couchpotato | |
CP_HOME="/var/lib/CouchPotatoServer" | |
# User setup | |
useradd --system --user-group --home "${CP_HOME}" ${CP_USER} | |
# Install | |
git clone ${CP_GIT} ${CP_HOME} | |
chown -R ${CP_USER}:${CP_USER} "${CP_HOME}" | |
chmod 700 "${CP_HOME}" | |
# Fedora service setup | |
cp ${CP_HOME}/init/couchpotato.fedora.service /usr/lib/systemd/system/couchpotato.service | |
chmod 755 /usr/lib/systemd/system/couchpotato.service | |
systemctl enable couchpotato | |
# start on boot | |
chkconfig --levels 345 couchpotato on | |
#firewall-cmd --permanent --add-port=5050/tcp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment