Update init.sh
This commit is contained in:
parent
61da757002
commit
dc6a1b7d9a
6
init.sh
6
init.sh
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue