2017-08-22 01:11:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-08-22 04:38:53 +00:00
|
|
|
echo "Running intval3 install script"
|
2018-10-07 19:10:04 +00:00
|
|
|
sudo apt update
|
|
|
|
sudo apt install git ufw nginx jq -y
|
2017-08-22 01:11:07 +00:00
|
|
|
|
|
|
|
echo "Installing node.js dependencies.."
|
2018-10-07 19:10:04 +00:00
|
|
|
sudo apt install nodejs npm -y
|
|
|
|
sudo npm install -g n
|
|
|
|
sudo n 9.1.0
|
|
|
|
sudo npm install -g npm@latest
|
|
|
|
sudo npm install -g pm2 node-gyp
|
2017-08-22 01:11:07 +00:00
|
|
|
|
|
|
|
echo "Installing bluetooth dependencies..."
|
2018-10-07 19:10:04 +00:00
|
|
|
sudo apt install bluetooth bluez libbluetooth-dev libudev-dev -y
|
|
|
|
sudo systemctl disable bluetooth
|
|
|
|
sudo hciconfig hci0 up
|
2017-08-22 01:11:07 +00:00
|
|
|
|
|
|
|
echo "Configuring ufw (firewall)..."
|
2018-10-07 19:10:04 +00:00
|
|
|
sudo ufw default deny incoming
|
|
|
|
sudo ufw default allow outgoing
|
|
|
|
sudo ufw allow ssh
|
|
|
|
sudo ufw allow http
|
|
|
|
sudo ufw allow https
|
|
|
|
sudo ufw enable
|
2017-08-22 01:11:07 +00:00
|
|
|
|
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
|
2018-10-07 19:10:30 +00:00
|
|
|
sudo pm2 start process.json
|
2017-08-22 01:11:07 +00:00
|
|
|
|
2017-08-22 04:38:53 +00:00
|
|
|
echo "Finished installing intval3"
|