Update init.sh

This commit is contained in:
Jeffrey Paul 2018-03-06 16:12:04 -05:00 committed by GitHub
parent 9370a5bbfc
commit a4693e5f7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

14
init.sh
View File

@ -4,13 +4,16 @@
apt-get update
apt-get -y upgrade
apt-get -y install vim byobu screen build-essential
apt-get -y install vim byobu screen build-essential git
if [[ ! -d /home/sneak ]]; then
mkdir -p /home/sneak
chown sneak:sneak /home/sneak
fi
# run the rest as sneak:
sudo -H -u sneak bash <<EOF
if [[ ! -d /home/sneak/.ssh ]]; then
mkdir -p /home/sneak/.ssh
chown sneak:sneak /home/sneak/.ssh
@ -23,3 +26,12 @@ if [[ ! -e /home/sneak/.ssh/sneak.keys ]]; then
cat *.keys > authorized_keys
chown sneak:sneak *
fi
if [[ ! -d /home/sneak/hacks ]]; then
cd /home/sneak
git clone https://github.com/sneak/hacks.git
fi
rsync -avP /home/sneak/hacks/homedir.skel/ /home/sneak/
EOF