mirror of
https://github.com/Unimatrix0/update_ombi.git
synced 2025-08-21 13:54:25 -07:00
Merge f1428fba6c
into 0b7974e80a
This commit is contained in:
commit
f24ab5b916
1 changed files with 42 additions and 30 deletions
|
@ -102,6 +102,14 @@ unzip-strip() (
|
|||
fi && rm -rf "$temp"/* "$temp"
|
||||
)
|
||||
|
||||
IsSystemdSupported() {
|
||||
if command -v systemctl > /dev/null && systemctl | grep -q '\-\.mount'; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Import any custom config to override the defaults, if necessary
|
||||
configfile="$(dirname $0)/update_ombi.conf"
|
||||
if [ -e $configfile ]; then
|
||||
|
@ -222,6 +230,7 @@ fi
|
|||
.log 6 "File size validated...checking Ombi service status..."
|
||||
|
||||
declare -i running=0
|
||||
if IsSystemdSupported; then
|
||||
if [ "`systemctl is-active $ombiservicename`" == "active" ]; then
|
||||
running=1
|
||||
.log 6 "Ombi is active...attempting to stop..."
|
||||
|
@ -255,6 +264,9 @@ if [ "`systemctl is-active $ombiservicename`" == "active" ]; then
|
|||
else
|
||||
.log 6 "Ombi is not active...installing update..."
|
||||
fi
|
||||
else
|
||||
.log 4 "systemd not available..."
|
||||
fi
|
||||
|
||||
unzip-strip $file $installdir
|
||||
.log 6 "Update installed...setting ownership..."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue