mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-20 10:21:36 -04:00
plex-absolute-hama update/add workflows
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
apt-get update
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# install git if needed
|
||||
if [ -z `command -v git` ]; then
|
||||
echo "**** installing git ****"
|
||||
apt-get install --no-install-recommends -y git
|
||||
fi
|
||||
|
||||
# clone or update Absolute Series Scanner repo
|
||||
if [ ! -d /config/absolute ]; then
|
||||
echo "**** no scanner repo found, cloning. ****"
|
||||
s6-setuidgid abc git clone --depth 1 https://github.com/ZeroQI/Absolute-Series-Scanner /config/absolute
|
||||
else
|
||||
echo "**** updating scanner repo ****"
|
||||
s6-setuidgid abc git -C /config/absolute pull
|
||||
fi
|
||||
chown -R abc:abc /config/absolute
|
||||
|
||||
scannerdir="/config/Library/Application Support/Plex Media Server/Scanners/Series"
|
||||
mkdir -p "$scannerdir"
|
||||
|
||||
# copy the scanner if missing or out of date
|
||||
if [ ! -f "$scannerdir/Absolute Series Scanner.py" ]; then
|
||||
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"
|
||||
fi
|
||||
fi
|
||||
chown -R abc:abc "$scannerdir"
|
||||
|
||||
plugindir="/config/Library/Application Support/Plex Media Server/Plug-ins"
|
||||
|
||||
# clone or update Hama.bundle repo
|
||||
if [ ! -d "$plugindir/Hama.bundle" ]; then
|
||||
echo "**** no agent found, cloning ****"
|
||||
s6-setuidgid abc git clone --depth 1 https://github.com/ZeroQI/Hama.bundle "$plugindir/Hama.bundle"
|
||||
else
|
||||
echo "**** pulling latest update ****"
|
||||
s6-setuidgid abc git -C "$plugindir/Hama.bundle" pull
|
||||
fi
|
||||
chown -R abc:abc "$plugindir/Hama.bundle"
|
||||
@@ -8,12 +8,12 @@ else
|
||||
echo "**** updating scanner repo ****"
|
||||
s6-setuidgid abc git -C /config/absolute pull
|
||||
fi
|
||||
chown -R abc:abc /config/absolute
|
||||
lsiown -R abc:abc /config/absolute
|
||||
|
||||
if [ ! -d "/config/Library/Application Support/Plex Media Server" ]; then
|
||||
echo "**** Creating Scanner and Plug-ins folders ****"
|
||||
mkdir -p "/config/Library/Application Support/Plex Media Server/Scanners/Series" "/config/Library/Application Support/Plex Media Server/Plug-ins"
|
||||
chown -R abc:abc "/config/Library/Application Support/Plex Media Server"
|
||||
lsiown -R abc:abc "/config/Library/Application Support/Plex Media Server"
|
||||
fi
|
||||
|
||||
scannerdir="/config/Library/Application Support/Plex Media Server/Scanners/Series"
|
||||
@@ -28,7 +28,7 @@ else
|
||||
cp -f "/config/absolute/Scanners/Series/Absolute Series Scanner.py" "$scannerdir/Absolute Series Scanner.py"
|
||||
fi
|
||||
fi
|
||||
chown -R abc:abc "$scannerdir"
|
||||
lsiown -R abc:abc "$scannerdir"
|
||||
|
||||
plugindir="/config/Library/Application Support/Plex Media Server/Plug-ins"
|
||||
|
||||
@@ -40,4 +40,4 @@ else
|
||||
echo "**** pulling latest update ****"
|
||||
s6-setuidgid abc git -C "$plugindir/Hama.bundle" pull
|
||||
fi
|
||||
chown -R abc:abc "$plugindir/Hama.bundle"
|
||||
lsiown -R abc:abc "$plugindir/Hama.bundle"
|
||||
|
||||
Reference in New Issue
Block a user