mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-17 16:35:47 -04:00
Merge pull request #249 from linuxserver/plex-absolute-hama-apt
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
apt-get update
|
||||||
@@ -2,17 +2,17 @@
|
|||||||
|
|
||||||
# install git if needed
|
# install git if needed
|
||||||
if [ -z `command -v git` ]; then
|
if [ -z `command -v git` ]; then
|
||||||
echo "**** installing git ****"
|
echo "**** installing git ****"
|
||||||
apt-get update && apt-get install --no-install-recommends -y git
|
apt-get install --no-install-recommends -y git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# clone or update Absolute Series Scanner repo
|
# clone or update Absolute Series Scanner repo
|
||||||
if [ ! -d /config/absolute ]; then
|
if [ ! -d /config/absolute ]; then
|
||||||
echo "**** no scanner repo found, cloning. ****"
|
echo "**** no scanner repo found, cloning. ****"
|
||||||
git clone --depth 1 https://github.com/ZeroQI/Absolute-Series-Scanner /config/absolute
|
git clone --depth 1 https://github.com/ZeroQI/Absolute-Series-Scanner /config/absolute
|
||||||
else
|
else
|
||||||
echo "**** updating scanner repo ****"
|
echo "**** updating scanner repo ****"
|
||||||
git -C /config/absolute pull
|
git -C /config/absolute pull
|
||||||
fi
|
fi
|
||||||
|
|
||||||
scannerdir="/config/Library/Application Support/Plex Media Server/Scanners/Series"
|
scannerdir="/config/Library/Application Support/Plex Media Server/Scanners/Series"
|
||||||
@@ -20,13 +20,13 @@ mkdir -p "$scannerdir"
|
|||||||
|
|
||||||
# copy the scanner if missing or out of date
|
# copy the scanner if missing or out of date
|
||||||
if [ ! -f "$scannerdir/Absolute Series Scanner.py" ]; then
|
if [ ! -f "$scannerdir/Absolute Series Scanner.py" ]; then
|
||||||
echo "**** no scanner found. copying from repo ****"
|
echo "**** no scanner found. copying from repo ****"
|
||||||
cp -f "/config/absolute/Scanners/Series/Absolute Series Scanner.py" "$scannerdir/Absolute Series Scanner.py"
|
|
||||||
else
|
|
||||||
if [ $(date -r "$scannerdir/Absolute Series Scanner.py" +%s) -lt $(date -r "/config/absolute/Scanners/Series/Absolute Series Scanner.py" +%s) ]; then
|
|
||||||
echo "**** scanner out of date, copying latest version ****"
|
|
||||||
cp -f "/config/absolute/Scanners/Series/Absolute Series Scanner.py" "$scannerdir/Absolute Series Scanner.py"
|
cp -f "/config/absolute/Scanners/Series/Absolute Series Scanner.py" "$scannerdir/Absolute Series Scanner.py"
|
||||||
fi
|
else
|
||||||
|
if [ $(date -r "$scannerdir/Absolute Series Scanner.py" +%s) -lt $(date -r "/config/absolute/Scanners/Series/Absolute Series Scanner.py" +%s) ]; then
|
||||||
|
echo "**** scanner out of date, copying latest version ****"
|
||||||
|
cp -f "/config/absolute/Scanners/Series/Absolute Series Scanner.py" "$scannerdir/Absolute Series Scanner.py"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
chown -R abc:abc "$scannerdir"
|
chown -R abc:abc "$scannerdir"
|
||||||
|
|
||||||
@@ -34,10 +34,10 @@ plugindir="/config/Library/Application Support/Plex Media Server/Plug-ins"
|
|||||||
|
|
||||||
# clone or update Hama.bundle repo
|
# clone or update Hama.bundle repo
|
||||||
if [ ! -d "$plugindir/Hama.bundle" ]; then
|
if [ ! -d "$plugindir/Hama.bundle" ]; then
|
||||||
echo "**** no agent found, cloning ****"
|
echo "**** no agent found, cloning ****"
|
||||||
git clone --depth 1 https://github.com/ZeroQI/Hama.bundle "$plugindir/Hama.bundle"
|
git clone --depth 1 https://github.com/ZeroQI/Hama.bundle "$plugindir/Hama.bundle"
|
||||||
else
|
else
|
||||||
echo "**** pulling latest update ****"
|
echo "**** pulling latest update ****"
|
||||||
git -C "$plugindir/Hama.bundle" pull
|
git -C "$plugindir/Hama.bundle" pull
|
||||||
fi
|
fi
|
||||||
chown -R abc:abc "$plugindir/Hama.bundle"
|
chown -R abc:abc "$plugindir/Hama.bundle"
|
||||||
|
|||||||
Reference in New Issue
Block a user