mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-11-26 22:15:41 +01:00
18 lines
420 B
Plaintext
18 lines
420 B
Plaintext
#!/usr/bin/with-contenv bash
|
|
|
|
mkdir -p /config/{extensions,data,workspace,.ssh}
|
|
|
|
if [ -n "${SUDO_PASSWORD}" ]; then
|
|
echo "setting up sudo access"
|
|
if [ ! $(cat /etc/sudoers | grep abc) ]; 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
|