Update init.sh

This commit is contained in:
Jeffrey Paul 2018-03-06 16:16:02 -05:00 committed by GitHub
parent 61da757002
commit dc6a1b7d9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -7,8 +7,8 @@ apt-get -y upgrade
apt-get -y install vim byobu screen build-essential git apt-get -y install vim byobu screen build-essential git
if [[ ! -d /home/sneak ]]; then if [[ ! -d /home/sneak ]]; then
mkdir -p /home/sneak useradd -m sneak
chown sneak:sneak /home/sneak usermod -a -G sudo sneak
fi fi
# run the rest as sneak: # run the rest as sneak:
@ -16,7 +16,6 @@ sudo -H -u sneak bash <<EOF
if [[ ! -d /home/sneak/.ssh ]]; then if [[ ! -d /home/sneak/.ssh ]]; then
mkdir -p /home/sneak/.ssh mkdir -p /home/sneak/.ssh
chown sneak:sneak /home/sneak/.ssh
fi fi
if [[ ! -e /home/sneak/.ssh/sneak.keys ]]; then if [[ ! -e /home/sneak/.ssh/sneak.keys ]]; then
@ -24,7 +23,6 @@ if [[ ! -e /home/sneak/.ssh/sneak.keys ]]; then
wget https://github.com/sneak.keys && \ wget https://github.com/sneak.keys && \
mv authorized_keys authorized-keys-orig.keys && \ mv authorized_keys authorized-keys-orig.keys && \
cat *.keys > authorized_keys cat *.keys > authorized_keys
chown sneak:sneak *
fi fi
if [[ ! -d /home/sneak/hacks ]]; then if [[ ! -d /home/sneak/hacks ]]; then