Last active
January 9, 2018 13:32
-
-
Save SippieCup/8ee8970b43503224e6396f32573d0ed9 to your computer and use it in GitHub Desktop.
ombi autoinstaller
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/ucvh6jksnjkgs54h/artifacts/linux.tar.gz | |
echo '\t [Done]' | |
echo 'Extracting...', | |
useradd ombi | |
tar xvzf linux.tar.gz -C /opt/ombi | |
chown -R ombi:ombi /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=ombi | |
Group=ombi | |
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 daemon-reload | |
systemctl start ombi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment