ethstats-client/bin/build.sh

45 lines
864 B
Bash
Raw Normal View History

2015-02-12 22:59:01 +01:00
#!/bin/sh
2015-02-12 23:30:12 +01:00
cd ~
2015-04-03 07:30:51 +02:00
mkdir bin
mkdir logs
2015-02-12 22:59:01 +01:00
# let's install packages
2015-02-17 18:22:28 +01:00
sudo apt-get -y update
2015-04-03 07:30:51 +02:00
sudo apt-get -y upgrade
2015-02-12 22:59:01 +01:00
# Setup Ethereum repos
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo add-apt-repository -y ppa:ethereum/ethereum-dev
2015-02-17 18:22:28 +01:00
sudo apt-get -y update
2015-04-03 07:30:51 +02:00
sudo apt-get -y install software-properties-common build-essential git unzip wget nodejs npm ntp cloud-utils eth
# add eth symlink
ln -s /usr/bin/eth ~/bin/eth
2015-02-12 22:59:01 +01:00
# add node symlink
sudo ln -s /usr/bin/nodejs /usr/bin/node
# add node service
cd ~/bin
2015-02-17 19:29:35 +01:00
2015-02-12 23:35:22 +01:00
[ ! -d "www" ] && git clone https://github.com/cubedro/eth-net-intelligence-api www
2015-02-12 22:59:01 +01:00
cd www
2015-04-02 16:38:59 +02:00
npm install
npm install pm2 -g
2015-02-17 19:07:00 +01:00
2015-02-26 22:45:24 +01:00
cp -b ./processes.json ./..
2015-04-03 00:09:17 +02:00
2015-04-02 20:11:55 +02:00
# set up time update cronjob
cat > /etc/cron.hourly/ntpdate << EOF
#!/bin/sh
sudo service ntp stop
sudo ntpdate -s ntp.ubuntu.com
sudo service ntp start
EOF
2015-04-03 00:02:32 +02:00
2015-04-02 20:11:55 +02:00
sudo chmod 755 /etc/cron.hourly/ntpdate