Create init.sh

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

25
init.sh Normal file
View File

@ -0,0 +1,25 @@
#!/bin/sh
# run as root
apt-get update
apt-get -y upgrade
apt-get -y install vim byobu screen build-essential
if [[ ! -d /home/sneak ]]; then
mkdir -p /home/sneak
chown sneak:sneak /home/sneak
fi
if [[ ! -d /home/sneak/.ssh ]]; then
mkdir -p /home/sneak/.ssh
chown sneak:sneak /home/sneak/.ssh
fi
if [[ ! -e /home/sneak/.ssh/sneak.keys ]]; then
cd /home/sneak/.ssh && \
wget https://github.com/sneak.keys && \
mv authorized_keys authorized-keys-orig.keys && \
cat *.keys > authorized_keys
chown sneak:sneak *
fi