2017-08-22 01:11:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-08-22 04:38:53 +00:00
|
|
|
echo "Running intval3 install script"
|
2017-08-22 01:11:07 +00:00
|
|
|
apt-get update
|
2017-08-29 12:17:29 +00:00
|
|
|
apt-get install git ufw nginx jq -y
|
2017-08-22 01:11:07 +00:00
|
|
|
|
|
|
|
echo "Installing node.js dependencies.."
|
|
|
|
apt-get install nodejs npm -y
|
|
|
|
npm install -g n
|
|
|
|
n latest
|
|
|
|
npm install -g npm@latest
|
|
|
|
npm install -g pm2
|
|
|
|
|
|
|
|
echo "Installing bluetooth dependencies..."
|
|
|
|
apt-get install bluetooth bluez libbluetooth-dev libudev-dev -y
|
2017-08-22 04:38:53 +00:00
|
|
|
systemctl disable bluetooth
|
|
|
|
hciconfig hci0 up
|
2017-08-22 01:11:07 +00:00
|
|
|
|
|
|
|
echo "Configuring ufw (firewall)..."
|
|
|
|
ufw default deny incoming
|
|
|
|
ufw default allow outgoing
|
|
|
|
ufw allow ssh
|
|
|
|
ufw allow http
|
|
|
|
ufw allow https
|
|
|
|
ufw enable
|
|
|
|
|
2017-08-22 04:38:53 +00:00
|
|
|
echo "Installing intval3 project..."
|
|
|
|
wget https://github.com/sixteenmillimeter/intval3/archive/master.zip
|
|
|
|
unzip master.zip -d intval3/
|
2017-08-22 01:11:07 +00:00
|
|
|
rm master.zip
|
|
|
|
|
2017-08-22 04:38:53 +00:00
|
|
|
cd intval3
|
2017-08-22 01:11:07 +00:00
|
|
|
npm install
|
|
|
|
pm2 start process.json
|
|
|
|
|
2017-08-22 04:38:53 +00:00
|
|
|
echo "Finished installing intval3"
|