Last active
December 15, 2021 18:50
-
-
Save yorickdowne/2f3d70f1c7ea54ff537dd4f958369092 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# http://linuxcommand.org/wss0150.php | |
function error_exit | |
{ | |
echo "$1" 1>&2 | |
exit 1 | |
} | |
# http://unix.stackexchange.com/questions/70859/why-doesnt-sudo-su-in-a-shell-script-run-the-rest-of-the-script-as-root | |
if [ `whoami` = root ]; then | |
apt-get update | |
apt-get -y install docker.io docker-compose ssmtp | |
apt-get -y dist-upgrade | |
usermod -aG docker ubuntu | |
runuser -u ubuntu -- exec ${BASHSOURCE} | |
elif [ `whoami` = ubuntu ]; then | |
cd ~ | |
git clone https://github.com/eth2-educators/eth-docker traefik | |
else | |
echo "Should not be here!!!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment