Commit 1e52026b authored by Joeldo Holanda's avatar Joeldo Holanda

latest fixes to mn script

parent 05604a83
......@@ -21,7 +21,13 @@ echo ""
echo "Hit [ENTER] to start the masternode setup"
read setup
rm -rf MERGE_masternode_setup.sh*
./merge-cli stop
MERGE_CLI_CMD="merge-cli"
MERGE_TX_CMD="merge-tx"
MERGED_CMD="merged"
MERGE_CLI=`find . -name "$MERGE_CLI_CMD" | tail -1`
MERGE_TX=`find . -name "$MERGE_TX_CMD" | tail -1`
MERGED=`find . -name "$MERGED_CMD" | tail -1`
$MERGE_CLI stop
echo "Configuring your VPS with the recommended settings..."
sudo apt-get update
sudo apt-get install -y build-essential
......@@ -31,6 +37,8 @@ sudo apt-get install -y libssl1.0-dev
sudo apt-get install -y libdb5.3-dev
sudo apt-get install -y libdb5.3++-dev
sudo apt-get install -y libboost-all-dev
sudo apt-get install -y libboost-all-dev
sudo apt-get install -y miniupnpc
sudo apt-get install -y pkg-config
sudo apt-get install -y libtool
sudo apt-get install -y libevent-dev
......@@ -58,10 +66,10 @@ sudo ufw status
echo ""
echo ""
echo "Installing/Updating your masternode..."
./merge-cli stop
rm merged
rm merge-cli
rm merge-tx
$MERGE_CLI stop
rm $MERGED
rm $MERGE_CLI
rm $MERGE_TX
# Retrieve the latest wallet release
LATEST_RELEASE_URL=https://api.github.com/repos/ProjectMerge/merge/releases/latest
FILE_ENDIND=x86_64-linux-gnu.tar.gz
......@@ -71,6 +79,10 @@ wget $release_file_url
tar -xf $release_file_name
rm $release_file_name
MERGE_CLI=`find . -name "$MERGE_CLI_CMD" | tail -1`
MERGE_TX=`find . -name "$MERGE_TX_CMD" | tail -1`
MERGED=`find . -name "$MERGED_CMD" | tail -1`
echo "Masternode Configuration"
# Ask for the IP address
IP=$(sudo ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | tail -n 1)
......@@ -87,7 +99,7 @@ read PRIVKEY
# Edit configuration file
CONF_DIR=~/.merge\/
CONF_FILE=merge.conf
PORT=62000
PORT=52000
mkdir -p $CONF_DIR
echo "rpcuser=user"`shuf -i 100000-10000000 -n 1` >> $CONF_DIR/$CONF_FILE
echo "rpcpassword=passw"`shuf -i 100000-10000000 -n 1` >> $CONF_DIR/$CONF_FILE
......@@ -103,7 +115,7 @@ echo "" >> $CONF_DIR/$CONF_FILE
echo "port=$PORT" >> $CONF_DIR/$CONF_FILE
echo "masternodeaddr=$IP:$PORT" >> $CONF_DIR/$CONF_FILE
echo "masternodeprivkey=$PRIVKEY" >> $CONF_DIR/$CONF_FILE
./bin/merged -resync
$MERGED -resync
echo "If the server fails to start, try ./merged -reindex"
echo ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment