Last active
December 18, 2017 16:26
-
-
Save SippieCup/e3176de62534ebb844e85da69ee69728 to your computer and use it in GitHub Desktop.
Automated Migration to Ombi 3 in OpenFLIXR.
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
#!/bin/bash | |
echo 'Starting automated Ombi Migration' | |
echo 'Downloading...', | |
cd /tmp/ | |
apt-get -y install libunwind8 | |
mkdir /opt/ombi | |
wget https://ci.appveyor.com/api/buildjobs/e9gylkx5j5ty8jty/artifacts/linux.tar.gz | |
echo '\t [Done]' | |
echo 'Extracting...', | |
tar xvzf linux.tar.gz -C /opt/ombi | |
echo '\t [Done]' | |
echo 'Configuring Services...', | |
chmod 775 /opt/ombi | |
cat >/etc/systemd/system/ombi.service <<EOL | |
[Unit] | |
Description=Systemd script to run Ombi as a service | |
After=network-online.target | |
[Service] | |
User=root | |
Group=root | |
WorkingDirectory=/opt/ombi/ | |
ExecStart=/opt/ombi/Ombi | |
TimeoutStopSec=30 | |
Restart=on-failure | |
RestartSec=5 | |
[Install] | |
WantedBy=multi-user.target | |
EOL | |
systemctl enable ombi.service | |
systemctl stop plexrequestsnet.service | |
systemctl disable plexrequestnet | |
mkdir /etc/monit/conf.d/bak | |
mv -f /etc/monit/conf.d/plexrequests /etc/monit/conf.d/bak/plexrequestsnet | |
systemctl daemon-reload | |
systemctl start ombi | |
cat >/etc/monit/conf.d/ombi <<EOL | |
check process Ombi matching "Ombi" | |
start program = "/usr/sbin/service ombi start" | |
stop program = "/usr/sbin/service ombi stop" | |
if failed host 127.0.0.1 port 5000 then restart | |
EOL | |
echo '\t [Done]' | |
echo 'Configuring nginx...', | |
sed -i 's/3579/5000/g' /etc/nginx/sites-enabled/reverse | |
systemctl reload nginx | |
echo '\t [Done]' | |
echo 'Finished installing and setting up Ombi' | |
echo 'Navigate to your.openflixr.ip:5000 and configure the base url to /request' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment