Skip to content

Instantly share code, notes, and snippets.

@SippieCup
Last active January 9, 2018 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SippieCup/8ee8970b43503224e6396f32573d0ed9 to your computer and use it in GitHub Desktop.
Save SippieCup/8ee8970b43503224e6396f32573d0ed9 to your computer and use it in GitHub Desktop.
ombi autoinstaller
#!/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