Commit debee038 authored by DeepChat's avatar DeepChat

MN script: updated requisites, texts and refactored code.

parent 6dd301d2
......@@ -2,26 +2,26 @@
cd ~
rm -rf MERGE_masternode_setup.sh*
echo "****************************************************************************"
echo "* This script will install and configure your MERGE masternodes. *"
echo "* *"
echo "* If you have any issues please ask for help on the MERGE discord. *"
echo "* https://discord.gg/b88VWfB *"
echo "* https://projectmerge.org/ *"
echo "* This script will install and configure your MERGE masternode *"
echo "* (Remote Wallet) *"
echo "* *"
echo "* If you have any issues, please ask for help on Merge's Discord: *"
echo "* https://discord.gg/b88VWfB *"
echo "* *"
echo "* https://projectmerge.org *"
echo "****************************************************************************"
echo ""
echo ""
echo ""
echo "****************************************************************************"
echo "* Express Installation Script *"
echo "* Installation Script *"
echo "****************************************************************************"
echo ""
echo ""
echo ""
echo "Do you want to use our Masternode/Wallet installation? [y/n], followed by [ENTER]"
echo "Hit [ENTER] to start the masternode setup"
read setup
rm -rf MERGE_masternode_setup.sh*
./merge-cli stop
echo "Configure your VPS with MERGE recommended settings"
echo "Configuring your VPS with the recommended settings..."
sudo apt-get update
sudo apt-get install -y build-essential autoconf automake libssl1.0-dev libdb5.3-dev libdb5.3++-dev libboost-all-dev pkg-config libtool libevent-dev git screen autotools-dev bsdmainutils lsof dos2unix zlib1g-dev
sudo apt-get install -y ufw
......@@ -34,8 +34,7 @@ read setup
sudo ufw status
echo ""
echo ""
echo ""
echo "installing/updating your Masternode"
echo "Installing/Updating your masternode..."
./merge-cli stop
rm merged
rm merge-cli
......@@ -45,20 +44,23 @@ read setup
rm merge-testnet-1.0.0-linux64.tar.gz
echo "Masternode Configuration"
echo "Your IP address is:"
echo "Your IP address is: "
sudo ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'
echo "Is this the IP you wish to use for MasterNode? [y/n] , followed by [ENTER]"
echo "Is this the IP address you wish to use for your masternode? [y/n], followed by [ENTER]"
read ipd
if [[ $ipd =~ "y" ]] || [[$ipd =~ "Y" ]] ; then
echo ""
echo "Using your default IP address"
echo "Enter masternode private key for node, followed by [ENTER]: $ALIAS"
if [[ $ipd =~ "y" ]] || [[ $ipd =~ "Y" ]] ; then
IP=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')
echo "Using your default IP address: $IP"
else
echo "Type the custom IP address for this masternode, followed by [ENTER]: "
read IP
fi
echo "Enter the masternode's private key, followed by [ENTER]: $ALIAS"
read PRIVKEY
CONF_DIR=~/.MERGE\/
CONF_FILE=MERGE.conf
CONF_DIR=~/.merge\/
CONF_FILE=merge.conf
PORT=62000
IP=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')
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
......@@ -75,43 +77,12 @@ read ipd
echo "masternodeaddr=$IP:$PORT" >> $CONF_DIR/$CONF_FILE
echo "masternodeprivkey=$PRIVKEY" >> $CONF_DIR/$CONF_FILE
./merged -resync
echo "if server start failure try ./merged -reindex"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "! !"
echo "! Your MasterNode is setup please close terminal !"
echo "! and continue the local wallet setup guide !"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo ""
else
echo "Type the custom IP of this node, followed by [ENTER]:"
read DIP
echo ""
echo "Enter masternode private key for node, followed by [ENTER]: $ALIAS"
read PRIVKEY
CONF_DIR=~/.MERGE\/
CONF_FILE=MERGE.conf
PORT=62000
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
echo "rpcallowip=127.0.0.1" >> $CONF_DIR/$CONF_FILE
echo "listen=1" >> $CONF_DIR/$CONF_FILE
echo "server=1" >> $CONF_DIR/$CONF_FILE
echo "daemon=1" >> $CONF_DIR/$CONF_FILE
echo "logtimestamps=1" >> $CONF_DIR/$CONF_FILE
echo "maxconnections=256" >> $CONF_DIR/$CONF_FILE
echo "masternode=1" >> $CONF_DIR/$CONF_FILE
echo "" >> $CONF_DIR/$CONF_FILE
echo "" >> $CONF_DIR/$CONF_FILE
echo "port=$PORT" >> $CONF_DIR/$CONF_FILE
echo "masternodeaddr=$DIP:$PORT" >> $CONF_DIR/$CONF_FILE
echo "masternodeprivkey=$PRIVKEY" >> $CONF_DIR/$CONF_FILE
./merged -resync
echo "if server start failure try ./merged -reindex"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "! !"
echo "! Your MasterNode is setup please close terminal !"
echo "! and continue the local wallet setup guide !"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "If the server fails to start, try ./merged -reindex"
echo ""
fi
echo "****************************************************************************"
echo "* Your masternode is now setup. *"
echo "* Please continue with the Post-requisites steps. *"
echo "* *"
echo "* Merge *"
echo "****************************************************************************"
echo ""
\ No newline at end of file
# masternode-setup
# MERGE masternode setup script
# Pre-requisites:
1. Have your IP ready.
2. Have your private key ready.
1. Read our [masternode guide introduction](https://kb.projectmerge.org/guides/wallet/masternodes#setup-a-merge-masternode).
2. Follow the steps to configure the [Local Wallet](https://kb.projectmerge.org/guides/wallet/masternodes#local-wallet).
3. Have your IP ready.
4. Have your private key ready.
# How to run:
wget https://raw.githubusercontent.com/ProjectMerge/merge/script/masternode-setup/master/MERGE_masternode_setup.sh && chmod 755 MERGE_masternode_setup.sh && ./MERGE_masternode_setup.sh
sudo wget https://raw.githubusercontent.com/ProjectMerge/merge/script/masternode-setup/master/MERGE_masternode_setup.sh && chmod 755 MERGE_masternode_setup.sh && ./MERGE_masternode_setup.sh
# Post-requisites:
1. Setup your masternode.conf file.
2. Restart local wallet and start the masternode.
1. Follow the steps to [start your masternode](https://kb.projectmerge.org/guides/wallet/masternodes#start-your-masternode).
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