diff --git a/init.sh b/cloud-init.sh similarity index 65% rename from init.sh rename to cloud-init.sh index 7196329..fe2f286 100644 --- a/init.sh +++ b/cloud-init.sh @@ -4,8 +4,8 @@ ##cloud-config #runcmd: -# - curl -fsSL https://raw.githubusercontent.com/sneak/hacks/master/init.sh | bash - +# - curl -fsSL https://raw.githubusercontent.com/sneak/hacks/master/cloud-init.sh | bash + #exec 1 2>&1 | tee -a ${LOG_FILE} export DEBIAN_FRONTEND=noninteractive @@ -21,21 +21,28 @@ fi # run the rest as sneak: sudo -H -u sneak bash < authorized_keys fi -if [[ ! -d /home/sneak/hacks ]]; then - cd /home/sneak +if [[ ! -d ~/hacks ]]; then + cd ~ git clone https://github.com/sneak/hacks.git fi -rsync -avP /home/sneak/hacks/homedir.skel/ /home/sneak/ +mkdir -p ~/.local/bashrc.d +mkdir -p ~/.local/profile.d +mv ~/.profile ~/.local/profile.d/999.distro.profile.sh +mv ~/.bashrc ~/.local/bashrc.d/999.distro.bashrc.sh + +rsync -avP /home/sneak/hacks/homedir.skel/ /home/sneak/ EOF