Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinux authored Aug 15, 2019
0 parents commit f326c91
Showing 1 changed file with 102 additions and 0 deletions.
102 changes: 102 additions & 0 deletions fixmn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#/bin/bash
cd ~
echo "****************************************************************************"
echo "* This script will install and configure your FIX masternodes. *"
echo "* If you have any issues please ask for help on the FIX discord. *"
echo "* https://discordapp.com/invite/zZbnYKV *"
echo "* https://fix.network *"
echo "****************************************************************************"
echo ""
echo ""
echo ""
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "! !"
echo "! Make sure you double check before hitting enter !"
echo "! !"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo ""
echo ""
echo ""
echo "Do you want to install all needed updates and firewall settings (no if you did it before)? [y/n]"
read DOSETUP
if [[ $DOSETUP =~ "y" ]] || [[ $DOSETUP =~ "Y" ]] ; then
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade

sudo apt-get install -y ufw
sudo ufw allow ssh/tcp
sudo ufw limit ssh/tcp
sudo ufw logging on
sudo ufw allow 22
sudo ufw allow 17464
echo "y" | sudo ufw enable
sudo ufw status
fi

echo ""
wget https://github.com/NewCapital/FIX-Core/releases/download/fix_v3.2.2.2/fix-3.2.2.2-MN-x86_64-linux-gnu.tar.gz
tar -xvzf fix-3.2.2.2-MN-x86_64-linux-gnu.tar.gz
echo ""
echo "Configure your masternodes now!"
echo "Your recognised IP address is:"
sudo hostname -I | cut -d " " -f1
echo "Is this the IP you wish to use for MasterNode ? [y/n] , followed by [ENTER]"
read IPDEFAULT
if [[ $IPDEFAULT =~ "y" ]] || [[ $IPDEFAULT =~ "Y" ]] ; then
echo ""
echo "We are using your default IP address"
echo "Enter masternode private key for node, followed by [ENTER]: $ALIAS"
read PRIVKEY
CONF_DIR=~/.fix\/
CONF_FILE=fix.conf
PORT=17464
IP=$(hostname -I | cut -d " " -f1)
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 "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 "externalip=$IP" >> $CONF_DIR/$CONF_FILE
echo "masternodeprivkey=$PRIVKEY" >> $CONF_DIR/$CONF_FILE
./fixd -daemon
echo "if server start failure try ./fix -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=~/.fix\/
CONF_FILE=fix.conf
PORT=17464
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 "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 "externalip=$DIP" >> $CONF_DIR/$CONF_FILE
echo "masternodeprivkey=$PRIVKEY" >> $CONF_DIR/$CONF_FILE
./fixd -daemon
echo "if server start failure try ./fixd -reindex"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "! !"
echo "! Your MasterNode Is setup please close terminal !"
echo "! and continue the local wallet setup guide !"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo ""
fi

0 comments on commit f326c91

Please sign in to comment.