Files
hpcore/test/vm-cluster/setup-hp.sh
Ravin Perera 920be03ade Websocket re-architecture with websocketd and websocat (#89)
- Replaced beast with websocketd and websocat. #79 #83 #84
- Implemented inbound/outbound peer connection merging.
- Added graceful shutdown of hpcore with sigint. #87
2020-04-05 08:12:55 +05:30

28 lines
812 B
Bash
Executable File

#!/bin/bash
if [ -x "$(command -v node)" ]; then
echo "NodeJs already installed."
else
echo "Installing NodeJs..."
sudo apt-get update
sudo apt-get -y install curl
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs
fi
if [ -x "$(command -v fusermount3)" ]; then
echo "FUSE already installed."
else
echo "Installing FUSE..."
sudo cp ./libfuse3.so.3 /usr/local/lib/
sudo ldconfig
sudo cp ./fusermount3 /usr/local/bin/
fi
sudo rm -r ~/contract > /dev/null 2>&1
./hpcore new ./contract
pushd ./contract/cfg > /dev/null 2>&1
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout tlskey.pem -out tlscert.pem \
-subj "/C=AU/ST=ST/L=L/O=O/OU=OU/CN=localhost/emailAddress=hp@example" > /dev/null 2>&1
popd > /dev/null 2>&1