forked from 19morpheus80/helper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.turtlecoin.example
122 lines (96 loc) · 4.16 KB
/
config.turtlecoin.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#Details of the GitHub source location
GH_REPO="turtlecoin"
GH_URL="https://github.com/turtlecoin/" #keep trailing slash
GH_BRANCH="master"
#Abbreviated coin name or ticker - used for naming the docker containers
S_NAME="turtlecoin"
#Daemon executable
D_EXEC="TurtleCoind"
P2P_PORT="11897"
RPC_PORT="11898"
#If you change this line you have to rebuild your docker container (./helper build)
CHECKPOINTS_URL="https://github.com/turtlecoin/checkpoints/raw/master/checkpoints.csv"
#Extra daemon options
ENABLE_BLOCKEXPLORER="1" # 1 enables option
FEE_ADDRESS="TRTLuxqfDys1pfQ1omkHMVViY4sFh6My5Ff3HBY8XPp3cJBkEfD7romVyzKug3mb9NNR4A8kEjZxZ9CHUgWckBSpPfbxnWAQUGL"
FEE_AMOUNT="400" #empty this to turn off TX fees altogether
#Address to mine to
MINE_ADDR="$FEE_ADDRESS"
#Threads to use when mining
MINE_THREAD="1"
#Add whatever additional daemon flags you need to supply?
ADD_DAEMON=""
#Additional mining flags, excluding daemon-host, threads, and address, which are already supplied through variables
ADD_MINER=""
#Type the full path to the existing blockchain data folder, if your using that
#otherwise leave blank and the data location will be a docker volume
DATA_DIR=""
#Array containing software build pre-requisites
declare -a pReq=("build-essential" "g++-8" "gcc-8" "git" "libboost-all-dev" "cmake" "curl" "software-properties-common" "jq")
declare -i _allowsyncdiff=120 # how many blocks of desync to measure before daemon restart trigger
declare -i _restartcount=0
###################### You don't really need to touch anything below this line ########################
#######################################################################################################
##
#
#Set this to Yes to have the pre-requisites check to add UFW rules (for a public node)
CONFIG_FIREWALL="No"
#The miner docker name
M="miner"
DOCK_MINER="$S_NAME$M"
#The docker daemon name
D="daemon"
DOCK_DAEMON="$S_NAME$D"
#Where the Github source is going to be stored, relative to these scripts
RELA_PATH=".."
#The path we'll save the stripped binaries to, relative to the build path
OUT_DIR="bin"
#Text formatting
T_BOLD=$(tput bold)
T_NORM=$(tput sgr0)
if [ $ENABLE_BLOCKEXPLORER = "1" ]; then
ADD_DAEMON+=" --enable-blockexplorer"
fi
if [ ! -z $CHECKPOINTS_URL ]; then
ADD_DAEMON+=" --load-checkpoints=/root/checkpoints.csv"
fi
if [ ! -z $FEE_AMOUNT ] && [ ! -z $FEE_ADDRESS ]; then
ADD_DAEMON+=" --fee-address=$FEE_ADDRESS --fee-amount=$FEE_AMOUNT"
fi
# interactive or detached mode
if [ "$2" == "i" ]; then
INTMODE=""
else
INTMODE="-d " #keep the trailing space
fi
if [ ! -z $DATA_DIR ]; then
_mountcommand="-v $DATA_DIR:/data"
else
_mountcommand="--mount source=$S_NAME-data,target=/data"
fi
DAEMON_COMMAND="/usr/bin/$D_EXEC --rpc-bind-ip=0.0.0.0 --p2p-bind-ip 0.0.0.0 --data-dir=/data"
if [ ! -z "$ADD_DAEMON" ]; then
DAEMON_COMMAND+=" $ADD_DAEMON"
fi
DAEMON_COMMAND="docker run $INTMODE-it --restart=unless-stopped -p $RPC_PORT:$RPC_PORT -p $P2P_PORT:$P2P_PORT --name=$DOCK_DAEMON $_mountcommand $GH_REPO $DAEMON_COMMAND"
MINER_COMMAND="/usr/bin/miner --daemon-host=\$DAEMON_IP --threads=$MINE_THREAD --address=$MINE_ADDR"
if [ ! -z "$ADD_MINER" ]; then
ADD_MINER+=" $ADD_MINER"
fi
MINER_COMMAND="nice docker run $INTMODE-it --restart=unless-stopped --name=$DOCK_MINER $GH_REPO $MINER_COMMAND"
REPO_PATH=$(readlink -f "$RELA_PATH/$GH_REPO")
WORK_PATH=$(pwd)
BINDEST_PATH=$(readlink -f "$RELA_PATH/$OUT_DIR") #where we save stripped binaries
_titlebanner="
Morpheus'
┌─┐┬─┐┬ ┬┌─┐┌┬┐┌─┐┌┐┌┌─┐┌┬┐┌─┐ ┬ ┬┌─┐┬ ┌─┐┌─┐┬─┐
│ ├┬┘└┬┘├─┘ │ │ │││││ │ ││├┤ ├─┤├┤ │ ├─┘├┤ ├┬┘
└─┘┴└─ ┴ ┴ ┴ └─┘┘└┘└─┘─┴┘└─┘ ┴ ┴└─┘┴─┘┴ └─┘┴└─
"
_aboutbanner="
Written by and copyright (c)
19┌┬┐┌─┐┬─┐┌─┐┬ ┬┌─┐┬ ┬┌─┐
││││ │├┬┘├─┘├─┤├┤ │ │└─┐
┴ ┴└─┘┴└─┴ ┴ ┴└─┘└─┘└─┘80
[http://github.com/19morpheus80] under the GPL 3.0 License
"