initial commit of mod-python2

This commit is contained in:
aptalca
2020-01-28 13:28:16 -05:00
committed by Ryan Kuba
parent a9346cfc98
commit 2e4bca6e45
9 changed files with 60 additions and 389 deletions

View File

@@ -1,17 +0,0 @@
#!/usr/bin/with-contenv bash
mkdir -p /config/{extensions,data,workspace,.ssh}
if [ -n "${SUDO_PASSWORD}" ]; then
echo "setting up sudo access"
if ! grep -q 'abc' /etc/sudoers; then
echo "adding abc to sudoers"
echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers
fi
echo "setting sudo password"
echo -e "${SUDO_PASSWORD}\n${SUDO_PASSWORD}" | passwd abc
fi
# permissions
chown -R abc:abc \
/config

View File

@@ -0,0 +1,5 @@
#!/usr/bin/with-contenv bash
apt update && apt install -y \
python \
python-pip

View File

@@ -1,19 +0,0 @@
#!/usr/bin/with-contenv bash
if [ -n "${PASSWORD}" ]; then
AUTH="password"
else
AUTH="none"
echo "starting with no password"
fi
exec \
s6-setuidgid abc \
/usr/bin/code-server \
--port 8443 \
--user-data-dir /config/data \
--extensions-dir /config/extensions \
--disable-telemetry \
--disable-updates \
--auth "${AUTH}" \
/config/workspace