Browse Source

Create makeconf.sh

master^2
blackjok3rtt 7 years ago
committed by GitHub
parent
commit
0ccb31d62d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 22
      a-team/scripts/makeconf.sh

22
a-team/scripts/makeconf.sh

@ -0,0 +1,22 @@
#!/bin/bash
if [ "$1" = "" ]
then
echo "no coin specified"
echo "Enter infomation in the format:"
echo "./makeconf.sh datadir coinname"
echo "Example:"
echo "./makeconf.sh .dashcore dash"
else
confpath="$2.conf"
rpcuser=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1)
rpcpassword=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1)
mkdir "/mnt/$2_data"
ln -s /mnt/$2_data ~/$1
cd ~/$1
echo "rpcuser=$rpcuser" > $confpath
echo "rpcpassword=$rpcpassword" >> $confpath
echo "server=1" >> $confpath
echo "deamon=1" >> $confpath
echo "txindex=1" >> $confpath
fi
Loading…
Cancel
Save