forked from mikeytown2/masternode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenergid.sh
More file actions
131 lines (120 loc) · 3.13 KB
/
energid.sh
File metadata and controls
131 lines (120 loc) · 3.13 KB
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
123
124
125
126
127
128
129
130
131
#!/bin/bash
# shellcheck disable=SC2034
# Copyright (c) 2018
# All rights reserved.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
: '
# Run this file
```
bash -ic "$(wget -4qO- -o- raw.githubusercontent.com/mikeytown2/masternode/master/energid.sh)" ; source ~/.bashrc
```
'
# Directory.
DIRECTORY='.energicore'
# Port.
DEFAULT_PORT=9797
# Conf File.
CONF='energi.conf'
# Display Name.
DAEMON_NAME='Energi Core'
# Github user and project.
GITHUB_REPO='energicryptocurrency/energi'
# Binary base name.
BIN_BASE='energi'
# Username Prefix.
DAEMON_PREFIX='enrg_mn'
# Explorer URL.
EXPLORER_URL='https://explore.energi.network/'
# Amount of Collateral needed.
COLLATERAL=10000
# Coin Ticker.
TICKER='NRG'
# Tip Address.
TIPS='EfQZJxx86Xa2DqzP9Hdgv7HQe1MtYzQpDC'
# Dropbox Addnodes.
DROPBOX_ADDNODES='ayu1r026swtmoat'
# Dropbox Bootstrap.
DROPBOX_BOOTSTRAP='j9wb0stn3c6nwyf'
# Dropbox blocks and chainstake folders.
DROPBOX_BLOCKS_N_CHAINS='gsaqiry3h1ho3nh'
# Cycle Daemon.
DAEMON_CYCLE=0
# Slow Daemon Start.
SLOW_DAEMON_START=1
# Fallback Blockcount.
BLOCKCOUNT_FALLBACK_VALUE=450000
# Bad Explorer SSL.
BAD_SSL_HACK='--no-check-certificate'
# Extra configuation for the conf file.
EXTRA_CONFIG='maxconnections=24'
# Auto Recovery.
RESTART_IN_SYNC=0
# Multiple on single IP.
MULTI_IP_MODE=3
# Number of Connections to wait for.
DAEMON_CONNECTIONS=4
# Wait for MNSYNC
MNSYNC_WAIT_FOR='"AssetName": "MASTERNODE_SYNC_FINISHED"'
# Deeper Work Queue
EXTRA_CONFIG='rpcworkqueue=32'
# Sentinel Info.
SENTINEL_GITHUB='https://github.com/energicryptocurrency/sentinel.git'
SENTINEL_CONF_START='energi_conf'
ASCII_ART () {
echo -e "\\e[0m"
clear 2> /dev/null
cat << "ENERGI"
___
/\ \
/::\ \
/:/\:\__\
/:/ /:/ _/_
/:/ /:/ /\__\
\:\ \/ /:/ /
\:\ /:/ / ____ __ __ ____ ____ ___ __
\:\/:/ / || ||\ || || || \\ // \\ ||
\::/ / ||== ||\\|| ||== ||_// (( ___ ||
\/__/ ||___ || \|| ||___ || \\ \\_|| ||
ENERGI
}
# Discord User Info
# @mcarper#0918
# 401161988744544258
cd ~/ || exit
COUNTER=0
rm -f "${HOME}/___mn.sh"
while [[ ! -f "${HOME}/___mn.sh" ]] || [[ $( grep -Fxc "# End of masternode setup script." "${HOME}/___mn.sh" ) -eq 0 ]]
do
rm -f "${HOME}/___mn.sh"
echo "Downloading Masternode Setup Script."
wget -4qo- -t 2 -T 10 gist.githubusercontent.com/mikeytown2/1637d98130ac7dfbfa4d24bac0598107/raw/mcarper.sh -O "${HOME}/___mn.sh"
FILE_SIZE=0
if [[ -f "${HOME}/___mn.sh" ]]
then
FILE_SIZE=$(wc -c < "${HOME}/___mn.sh")
fi
if [[ "${FILE_SIZE}" -lt 10000 ]]
then
echo "Downloading Masternode Setup Script from alt domain."
wget -4qo- -t 2 -T 10 gist.githack.com/mikeytown2/1637d98130ac7dfbfa4d24bac0598107/raw/mcarper.sh -O "${HOME}/___mn.sh"
fi
COUNTER=$(( COUNTER+1 ))
if [[ "${COUNTER}" -gt 3 ]]
then
echo
echo "Download of masternode setup script failed."
echo
exit 1
fi
done
(
sleep 2
rm ~/___mn.sh
) & disown
# shellcheck disable=SC1091
# shellcheck source=/root/___mn.sh
. ~/___mn.sh
DAEMON_SETUP_THREAD
# shellcheck source=/root/.bashrc
. ~/.bashrc
stty sane 2>/dev/null