Update init.sh
This commit is contained in:
parent
9370a5bbfc
commit
a4693e5f7a
14
init.sh
14
init.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue