Initial commit

This commit is contained in:
TheSpad
2022-07-14 15:18:08 +01:00
parent 7412fbc30b
commit 1d991893e7
10 changed files with 107 additions and 397 deletions
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/with-contenv bash
if [ -f /usr/bin/apt ]; then
apt-get update
fi
+60
View File
@@ -0,0 +1,60 @@
#!/usr/bin/with-contenv bash
if [[ ! "$(uname -m)" == "x86_64" ]]; then
cat <<-EOF
********************************************************
********************************************************
* *
* !!!! *
* This mod is only supported on x86_64. *
* *
********************************************************
********************************************************
EOF
exit 0
fi
if [ ! -f /usr/bin/apt ]; then
cat <<-EOF
********************************************************
********************************************************
* *
* !!!! *
* This mod is only supported on images using an *
* Ubuntu base image. *
* *
********************************************************
********************************************************
EOF
exit 0
fi
export DEBIAN_FRONTEND="noninteractive"
if [ ! -L /usr/lib/x86_64-linux-gnu/libGL.so.1 ]; then
PACKAGES+=("libgl1-mesa-glx")
fi
if [ ! -L /usr/lib/x86_64-linux-gnu/libxdamage.so.1 ]; then
PACKAGES+=("libxdamage1")
fi
if [ ! -L /usr/lib/x86_64-linux-gnu/libEGL.so.1 ]; then
PACKAGES+=("libegl1")
fi
if [ ! -L /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 ]; then
PACKAGES+=("libxkbcommon0")
fi
if [ ! -L /usr/lib/x86_64-linux-gnu/libOpenGL.so.0 ]; then
PACKAGES+=("libopengl0")
fi
if [ -v "PACKAGES[@]" ]; then
apt-get install -y "${PACKAGES[@]}"
fi
if [ ! -e /usr/bin/calibre-server ]; then
/app/calibre/calibre_postinstall
fi
-27
View File
@@ -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