File tree 13 files changed +108
-56
lines changed
utils/nginx/locations-available
13 files changed +108
-56
lines changed Original file line number Diff line number Diff line change 2
2
3
3
APPNAME=' ombi'
4
4
APPSHORTNAME=' ombi'
5
- APPPATH=' /opt/ombi '
5
+ APPPATH=' /opt/Ombi '
6
6
APPTITLE=' Ombi'
7
- APPDEPS=' libmono-cil -dev'
7
+ APPDEPS=' libunwind8 libcurl4-openssl -dev'
8
8
APPDOWNLOADURL=' https://api.github.com/ombi/ombi/releases'
9
- APPDPORT=' 3579 '
9
+ APPDPORT=' 5000 '
10
10
APPSETTINGSTYPE=' DB'
11
11
APPSETTINGSDIR=$APPPATH
12
- APPSETTINGSDB=$APPSETTINGSDIR ' /Ombi.sqlite '
12
+ APPSETTINGSDB=" $APPSETTINGSDIR /Ombi.db "
13
13
ACCESSHOST=' NA'
14
- DBUSERSEARCH=' SELECT UserName FROM Users WHERE ID = 1;'
14
+ DBUSERSEARCH=' SELECT aspnetusers FROM Users ORDER BY ROWID ASC LIMIT 1;'
15
15
APPSYSTEMD=' ombi.service'
16
- APPSYSTEMDLOC=$SCRIPTPATH ' /ombi/' $APPSYSTEMD
16
+ APPSYSTEMDLOC=" $SCRIPTPATH /ombi/$APPSYSTEMD "
17
17
APPINITD=' ombi'
18
- APPINITDLOC=$SCRIPTPATH ' /ombi/ombi.init'
18
+ APPINITDLOC=" $SCRIPTPATH /ombi/ombi.init"
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- # Script Name: AtoMiC Ombi Installer
2
+ # Script Name: AtoMiC Ombi Downloader
3
3
4
4
echo
5
- echo -e " ${YELLOW} --->Latest File Found...$ENDCOLOR "
6
- OUTPUT=" $( curl -s https://api.github.com/repos/tidusjar/Ombi/releases | grep browser_download_url | head -n 1 | cut -d ' "' -f 4) "
5
+ ARCH=$( uname -m)
6
+ ARCHSHORT=${ARCH: 0: 3}
7
+ if [[ $ARCHSHORT = ' arm' ]]; then
8
+ FILENAME=' linux-arm.tar.gz'
9
+ else
10
+ FILENAME=' linux.tar.gz'
11
+ fi
12
+
13
+ OUTPUT=" $( curl -s https://api.github.com/repos/tidusjar/Ombi/releases | \
14
+ grep browser_download_url | \
15
+ grep $FILENAME | \
16
+ head -n 1 | \
17
+ cut -d ' "' -f 4) "
7
18
echo " ${OUTPUT} "
8
19
echo
9
- echo -e " ${YELLOW} --->Downloading files...$ENDCOLOR "
10
- sudo rm -rf /tmp/ombidownload
11
- sudo wget -P /tmp/ombidownload " ${OUTPUT} "
12
- echo -e " ${YELLOW} --->Extracting files...$ENDCOLOR "
13
- sudo unzip -q /tmp/ombidownload/* .zip -d /tmp/ombidownload/extract
14
- sudo mv /tmp/ombidownload/extract/Release/* " $APPPATH "
20
+ echo -e " $YELLOW --->Downloading and extracting Latest Release File...$ENDCOLOR "
21
+ sudo curl -L " ${OUTPUT} " | tar -xzf - -C " $APPPATH "
Original file line number Diff line number Diff line change 1
- /opt/ombi
1
+ APPPATH
Original file line number Diff line number Diff line change 2
2
# Script Name: AtoMiC Ombi init.d update
3
3
4
4
echo ' Updating init.d file'
5
- sudo sed -i " s@user=\" ReplaceMe\" @user=\" $UNAME \" @g" /etc/init.d/$APPINITD || \
6
- { echo -e " ${RED} Replacing user failed.$ENDCOLOR " ; exit 1; }
5
+ if sudo sed -i " s@user=\" ReplaceMe\" @user=\" $UNAME \" @g" " /etc/init.d/$APPINITD " || \
6
+ { echo -e " ${RED} Replacing user failed.$ENDCOLOR " ; exit 1; }; then
7
+ echo " Set USER to $UNAME "
8
+ fi
7
9
8
- sudo sed -i " s@group=\" ReplaceMe\" @group=\" $UGROUP \" @g" /etc/init.d/$APPINITD || \
9
- { echo -e " ${RED} Replacing group failed.$ENDCOLOR " ; exit 1; }
10
+ if sudo sed -i " s@group=\" ReplaceMe\" @group=\" $UGROUP \" @g" " /etc/init.d/$APPINITD " || \
11
+ { echo -e " ${RED} Replacing group failed.$ENDCOLOR " ; exit 1; }; then
12
+ echo " Set GROUP to $UGROUP "
13
+ fi
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# Script Name: AtoMiC Ombi Installer
3
-
4
- source " $SCRIPTPATH /inc/app-setup-check.sh"
3
+
5
4
source " $SCRIPTPATH /inc/commons.sh"
6
5
source " $SCRIPTPATH /inc/header.sh"
7
6
echo -e " ${GREEN} AtoMiC $APPTITLE Installer Script$ENDCOLOR "
8
7
source " $SCRIPTPATH /inc/pause.sh"
9
8
source " $SCRIPTPATH /inc/app-autostart-remove.sh"
9
+
10
+ # Added 15/03/2018 - Can be removed once users have updated.
11
+ # Removes old install.
12
+ if [[ -d /opt/ombi ]]; then
13
+ if sudo rm -r ' /opt/ombi' ; then
14
+ echo
15
+ echo ' Removed old /opt/ombi as its not compatable with Ombi V3'
16
+ fi
17
+ fi
18
+
10
19
source " $SCRIPTPATH /inc/app-move-previous.sh"
11
- source " $SCRIPTPATH /utils/mono/mono-installer.sh"
12
- source " $SCRIPTPATH /ombi/ombi-constants.sh"
13
20
source " $SCRIPTPATH /inc/app-install-deps.sh"
14
21
source " $SCRIPTPATH /inc/app-folders-create.sh"
15
22
source " $SCRIPTPATH /ombi/ombi-download.sh"
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# Script Name: AtoMiC Ombi Systemd Update
3
3
4
- sudo sed -i " s@User=ReplaceMe@User=$UNAME @g" /etc/systemd/system/$APPSYSTEMD || { echo -e $RED ' Modifying USER in SYSTEMD file failed.' $ENDCOLOR ; exit 1; }
5
- sudo sed -i " s@Group=ReplaceMe@Group=$UGROUP @g" /etc/systemd/system/$APPSYSTEMD || { echo -e $RED ' Modifying GROUP in SYSTEMD file failed.' $ENDCOLOR ; exit 1; }
4
+ if sudo sed -i " s@User=ReplaceMe@User=$UNAME @g" " /etc/systemd/system/$APPSYSTEMD " || \
5
+ { echo -e " ${RED} Modifying USER in SYSTEMD file failed.$ENDCOLOR " ; exit 1; }; then
6
+ echo " Set USER to $UNAME "
7
+ fi
8
+
9
+ if sudo sed -i " s@Group=ReplaceMe@Group=$UGROUP @g" " /etc/systemd/system/$APPSYSTEMD " || \
10
+ { echo -e " ${RED} Modifying GROUP in SYSTEMD file failed.$ENDCOLOR " ; exit 1; }; then
11
+ echo " Set GROUP to $UGROUP "
12
+ fi
6
13
7
14
sudo systemctl daemon-reload
8
15
sudo systemctl enable $APPSYSTEMD
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# Script Name: AtoMiC Ombi Uninstaller
3
3
4
- source " $SCRIPTPATH /inc/app-setup-check.sh"
5
4
source " $SCRIPTPATH /inc/commons.sh"
6
5
source " $SCRIPTPATH /inc/header.sh"
7
6
echo -e " ${GREEN} AtoMiC $APPTITLE Uninstaller Script$ENDCOLOR "
Original file line number Diff line number Diff line change @@ -7,14 +7,15 @@ echo -e "${GREEN}AtoMiC $APPTITLE Update Script$ENDCOLOR"
7
7
source " $SCRIPTPATH /inc/pause.sh"
8
8
9
9
if DoesAppFolderExist; then
10
- source " $SCRIPTPATH /inc/app-stop .sh"
11
- source " $SCRIPTPATH /utils/mono/mono-installer .sh"
12
- source " $SCRIPTPATH /ombi/ombi-constants .sh"
13
- source " $SCRIPTPATH /inc/app-install-deps .sh"
14
- source " $SCRIPTPATH /ombi/ombi-download .sh"
15
- source " $SCRIPTPATH /inc/app-set-permissions .sh"
16
- source " $SCRIPTPATH /inc/app-start .sh"
17
- source " $SCRIPTPATH /inc/app-update-confirmation .sh"
18
- source " $SCRIPTPATH /inc/thankyou.sh "
10
+ if source " $SCRIPTPATH /ombi/ombi-version-check .sh" ; then
11
+ source " $SCRIPTPATH /inc/app-stop .sh"
12
+ source " $SCRIPTPATH /inc/app-install-deps .sh"
13
+ source " $SCRIPTPATH /ombi/ombi-download .sh"
14
+ source " $SCRIPTPATH /inc/app-set-permissions .sh"
15
+ source " $SCRIPTPATH /inc/app-start .sh"
16
+ source " $SCRIPTPATH /inc/app-update-confirmation .sh"
17
+ source " $SCRIPTPATH /inc/thankyou .sh"
18
+ fi
19
19
fi
20
+
20
21
source " $SCRIPTPATH /inc/exit.sh"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Script Name: AtoMiC Ombi Downloader
3
+
4
+ echo
5
+ source " $SCRIPTPATH /inc/commons.sh"
6
+ echo -e " ${YELLOW} --->Ombi Version Check...$ENDCOLOR "
7
+ CONTENT=$( echo ' select content from globalsettings;' | sqlite3 " $APPSETTINGSDB " )
8
+ OMBIAPIKEY=$( grep -Po ' (?<="ApiKey":")([^"]+)' <<< " $CONTENT" )
9
+
10
+ if [[ -n $OMBIAPIKEY ]]; then
11
+ OMBIJSON=$( curl -sL --header " ApiKey: $OMBIAPIKEY " localhost:5000/api/v1/Settings/about)
12
+ OMBIINSTALLEDVERSION=$( grep -Po ' (?<="version":")([^"]+)' <<< " $OMBIJSON" )
13
+ echo -e " Installed Version: ${GREEN} $OMBIINSTALLEDVERSION$ENDCOLOR "
14
+ else
15
+ echo -e " ${YELLOW} ERROR: unable to retrieve APIKEY. Is it set in the Ombi settings?$ENDCOLOR "
16
+ echo " Updating continuing however possibly not necessary"
17
+ fi
18
+
19
+ OMBIAVAILABLETVERSION=$( curl -s https://github.com/tidusjar/Ombi/releases/latest | \
20
+ grep -o ' ".*"' | \
21
+ awk -F / ' {print $NF}' | \
22
+ sed s' /[v"]//g' )
23
+ echo -e " Available Version: ${GREEN} $OMBIAVAILABLETVERSION$ENDCOLOR "
24
+
25
+ vercomp " $OMBIINSTALLEDVERSION " " $OMBIAVAILABLETVERSION "
26
+ if [[ $? != 2 ]]; then
27
+ echo " Update not required"
28
+ exit 1
29
+ else
30
+ echo " Update Required"
31
+ fi
Original file line number Diff line number Diff line change 11
11
12
12
user=" ReplaceMe"
13
13
group=" ReplaceMe"
14
- dir=" /opt/ombi "
15
- cmd=" /usr/bin/mono Ombi.exe "
14
+ dir=" /opt/Ombi "
15
+ cmd=" /opt/Ombi/ Ombi"
16
16
17
17
name=` basename $0 `
18
18
PIDDIR=" /var/run/$name "
Original file line number Diff line number Diff line change 1
1
[Unit]
2
- Description =Ombi
3
- After =syslog.target network.target
2
+ Description =Ombi - PMS Requests System
3
+ After =network-online .target
4
4
5
5
[Service]
6
6
User =ReplaceMe
7
7
Group =ReplaceMe
8
-
8
+ WorkingDirectory =/opt/Ombi/
9
+ ExecStart =/opt/Ombi/Ombi
9
10
Type =simple
10
- ExecStart =/usr/bin/mono /opt/ombi/Ombi.exe
11
11
TimeoutStopSec =30
12
- Restart =always
12
+ Restart =on-failure
13
13
RestartSec =5
14
14
15
15
[Install]
Original file line number Diff line number Diff line change 5
5
echo -e " $YELLOW --->Configuring Transmission Settings...$ENDCOLOR "
6
6
7
7
# Set to allow network access instead of localhost.
8
+
8
9
if sudo sed -i " s@\" rpc-whitelist-enabled\" : \
9
10
true@\" rpc-whitelist-enabled\" : false@g" " $APPSETTINGS " || \
10
11
{ echo -e " ${RED} Modifying whitelist enabled in \
Original file line number Diff line number Diff line change 1
- # Version=1.0
2
- # # Ombi v2
1
+ # Version=2.0
2
+
3
+ # Ombi v3
3
4
location /ombi/ {
4
- proxy_pass http://127.0.0.1:3579 ;
5
+ proxy_pass http://127.0.0.1:5000 ;
5
6
proxy_set_header X-Forwarded-Ssl on; # This needs to be here for Ombi to work, even though it's in proxy.conf
6
7
}
7
-
8
- # # Ombi v3 (including this for later)
9
- # location /ombi/ {
10
- # proxy_pass http://127.0.0.1:5000;
11
- # proxy_set_header X-Forwarded-Ssl on; # This needs to be here for Ombi to work, even though it's in proxy.conf
12
- # }
13
- # if ($http_referer ~* /ombi/) {
14
- # rewrite ^/dist/([0-9\d*]).js /ombi/dist/$1.js last;
15
- # }
8
+ if ($http_referer ~* /ombi/) {
9
+ rewrite ^/dist/([0-9\d*]).js /ombi/dist/$1.js last;
10
+ }
You can’t perform that action at this time.
0 commit comments