mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-13 23:14:46 -04:00
initial commit
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# install git if needed
|
||||
if [ -z `command -v git` ]; then
|
||||
echo "**** installing git ****"
|
||||
apt-get update && 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. ****"
|
||||
git clone --depth 1 https://github.com/ZeroQI/Absolute-Series-Scanner /config/absolute
|
||||
else
|
||||
echo "**** updating scanner repo ****"
|
||||
git -C /config/absolute pull
|
||||
fi
|
||||
|
||||
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 ****"
|
||||
git clone --depth 1 https://github.com/ZeroQI/Hama.bundle "$plugindir/Hama.bundle"
|
||||
else
|
||||
echo "**** pulling latest update ****"
|
||||
git -C "$plugindir/Hama.bundle" pull
|
||||
fi
|
||||
chown -R abc:abc "$plugindir/Hama.bundle"
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Determine if setup is needed
|
||||
if [ ! -f /usr/local/lib/python***/dist-packages/sshuttle ] && \
|
||||
[ -f /usr/bin/apt ]; then
|
||||
## Ubuntu
|
||||
apt-get update
|
||||
apt-get install --no-install-recommends -y \
|
||||
iptables \
|
||||
openssh-client \
|
||||
python3 \
|
||||
python3-pip
|
||||
pip3 install sshuttle
|
||||
fi
|
||||
if [ ! -f /usr/lib/python***/site-packages/sshuttle ] && \
|
||||
[ -f /sbin/apk ]; then
|
||||
# Alpine
|
||||
apk add --no-cache \
|
||||
iptables \
|
||||
openssh \
|
||||
py3-pip \
|
||||
python3
|
||||
pip3 install sshuttle
|
||||
fi
|
||||
|
||||
chown -R root:root /root
|
||||
chmod -R 600 /root/.ssh
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
sshuttle --dns --remote root@${HOST}:${PORT} 0/0 -x 172.17.0.0/16
|
||||
Reference in New Issue
Block a user