18 lines
419 B
Plaintext
Raw Normal View History

2019-06-24 14:03:06 -04:00
#!/usr/bin/with-contenv bash
2019-06-24 15:15:27 -04:00
mkdir -p /config/{extensions,data,workspace,.ssh}
2019-06-24 14:03:06 -04:00
2019-07-09 17:43:45 -04:00
if [ -n "${SUDO_PASSWORD}" ]; then
echo "setting up sudo access"
2019-07-09 18:32:57 -04:00
if [ ! $(grep -c '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
2019-06-24 14:03:06 -04:00
# permissions
chown -R abc:abc \
/config