2018-12-12

This commit is contained in:
Martin Donnelly 2018-12-12 16:30:23 +00:00
parent a15c4ee435
commit a028fbe8ee
2 changed files with 29 additions and 0 deletions

Binary file not shown.

29
scripts/userdata.sh Normal file
View File

@ -0,0 +1,29 @@
#!/bin/bash
NVM="$HOME/.nvm"
NVM_VERSION="stable"
DEV="$HOME/dev"
SWAP="/swapfile"
apt-get -y -q update && apt-get -y -q upgrade
apt-get --assume-yes install build-essential git htop nodejs npm screen wget curl xorg openbox libasound2
apt-get -y -q clean
fallocate -l 1G $SWAP
chmod 600 $SWAP
mkswap $SWAP
swapon $SWAP
echo '/swapfile none swap defaults 0 0' >> /etc/fstab
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR=$NVM
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
source $HOME/.bashrc
source $NVM/nvm.sh
nvm install $NVM_VERSION
npm install -g gulp pm2@latest npm-check npm-install-missing
pm2 update
touch $HOME/martin.txt