File tree Expand file tree Collapse file tree 9 files changed +6
-548
lines changed Expand file tree Collapse file tree 9 files changed +6
-548
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Paris"
18
18
RUN apt-get update \
19
19
&& apt-get upgrade -y \
20
20
&& apt install -y curl wget screen procps python3-pip netcat \
21
- && apt autoclean -y \
22
- && python3 -m pip install -U discord.py==1.7.3
21
+ && apt autoclean -y
23
22
24
23
# Download the Massa package
25
24
COPY download-massa.sh .
Original file line number Diff line number Diff line change @@ -21,8 +21,4 @@ PATH_NODE="$PATH_MASSA"/massa-node
21
21
PATH_NODE_CONF =" $PATH_NODE" /config
22
22
# Chemin ou se trouve la version compilee de massa-client
23
23
PATH_TARGET =.
24
- # Path of massabot reply
25
- PATH_MASSABOT_REPLY =/massa-guard/massabot.tmp
26
- # Path to unreachable bootstrappers list
27
- PATH_TO_UNREACHABLE_BOOTSTRAPPERS =/massa_mount/config/bootstrappers_unreachable.txt
28
24
# #################################################
Original file line number Diff line number Diff line change @@ -5,16 +5,12 @@ NODE_LOGS=1
5
5
MASSAGUARD =1
6
6
# Autoupdate node when new node release version is available on massalabs website (Please note all update can occur an issue for massaguard working)
7
7
AUTOUPDATE =0
8
- # Discord token - Must be set with your token discord - Please refer to https://shufflegazine.com/get-discord-token/
9
- DISCORD_TOKEN =" NULL"
10
8
# RAM max for node in percent - If RAM is over NODE_MAX_RAM value, node will restrat to purge RAM allocation
11
9
NODE_MAX_RAM =90
12
10
# Set maximum roll amount that you want - if value is NULL massa-guard will buy roll with no max limit
13
11
TARGET_ROLL_AMOUNT =" NULL"
14
12
# Set if your node is under dyn or static public IP address - Set 1 for dynamic public IP or 0 for static public IP
15
13
DYN_PUB_IP =0
16
- # Set if node registered with massabot - Set with OK if node registrered with massabot or KO if you want to check and use registration process
17
- NODE_TESTNET_REGISTRATION =" KO"
18
14
# Node password (If ENV not set, default value is MassaToTheMoon2022)
19
15
NODE_PWD =" MassaToTheMoon2022"
20
16
# Wallet password (If ENV not set, default value is MassaToTheMoon2022)
Original file line number Diff line number Diff line change 42
42
MasBalance=$( GetMASAmount " $WalletAddress " )
43
43
# Buy max roll or 1 roll if possible when candidate roll amount = 0
44
44
BuyOrSellRoll " $CandidateRolls " " $MasBalance " " $WalletAddress "
45
- # [Depracated since testnet 16.0] Refresh bootstrap node with community connected and routable nodes
46
- # RefreshBootstrapNode
47
45
48
46
# If logs are disable
49
47
if ([ $NODE_LOGS -eq 0 ] && [ -e $PATH_LOGS_MASSANODE /current.txt ])
52
50
rm $PATH_LOGS_MASSANODE /current.txt $PATH_NODE /logs.txt > /dev/null 2& > 1
53
51
fi
54
52
55
- # If Discord feature enable
56
- if [ ! $DISCORD_TOKEN == " NULL " ]
53
+ # If dynamical IP feature enable and public IP is new
54
+ if ([ $DYN_PUB_IP -eq 1 ] && [ $( CheckPublicIP ) -eq 1 ])
57
55
then
58
- # Check and get faucet of current day
59
- PingFaucet
60
-
61
- # Check and registrer node with massabot if necessary
62
- CheckTestnetNodeRegistration " $WalletAddress "
63
-
64
- # If dynamical IP feature enable and public IP is new
65
- if ([ $DYN_PUB_IP -eq 1 ] && [ $( CheckPublicIP) -eq 1 ])
66
- then
67
- # Refresh config.toml + restart node + push new IP to massabot
68
- RefreshPublicIP
69
- fi
56
+ # Refresh config.toml + restart node + [Depracated since Mainnet] push new IP to massabot
57
+ RefreshPublicIP
70
58
fi
71
59
fi
72
60
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 25
25
mkdir -p /massa_mount/config
26
26
echo " [$( date +%Y%m%d-%HH%M) ][INFO][INIT]CREATE /massa_mount/config folder" | & tee -a $PATH_LOGS_MASSAGUARD /$( date +%Y%m%d) -massa_guard.txt
27
27
cp /massa-guard/config/default_config_template.ini $PATH_CONF_MASSAGUARD /config.ini
28
- if [ $DISCORD ]; then python3 $PATH_SOURCES /set_config.py " DISCORD_TOKEN" \" $DISCORD \" $PATH_CONF_MASSAGUARD /config.ini ; fi
29
28
if [ $DYNIP ]; then python3 $PATH_SOURCES /set_config.py " DYN_PUB_IP" " $DYNIP " $PATH_CONF_MASSAGUARD /config.ini ; fi
30
29
if [ $NODEPWD ]; then python3 $PATH_SOURCES /set_config.py " NODE_PWD" \" $NODEPWD \" $PATH_CONF_MASSAGUARD /config.ini ; fi
31
30
if [ $WALLETPWD ]; then python3 $PATH_SOURCES /set_config.py " WALLET_PWD" \" $WALLETPWD \" $PATH_CONF_MASSAGUARD /config.ini ; fi
57
56
echo " routable_ip = \" $myIP \" " >> $PATH_MOUNT /config.toml
58
57
cp $PATH_MOUNT /config.toml $PATH_NODE_CONF /config.toml
59
58
60
- if [ ! $DISCORD_TOKEN == " NULL" ]
61
- then
62
- # Push IP to massabot
63
- timeout 2 python3 $PATH_SOURCES /push_command_to_discord.py $DISCORD_TOKEN $myIP > $PATH_MASSABOT_REPLY
64
- fi
65
-
66
59
echo " [$( date +%Y%m%d-%HH%M) ][INFO][INIT]Create your default config.toml with $myIP as routable IP" | & tee -a $PATH_LOGS_MASSAGUARD /$( date +%Y%m%d) -massa_guard.txt
67
60
fi
68
61
# Wallet to use
88
81
rm $PATH_NODE_CONF /staking_wallets/wallet_* > /dev/null 2& > 1
89
82
cp $PATH_MOUNT /wallet_* $PATH_NODE_CONF /staking_wallets/
90
83
echo " [$( date +%Y%m%d-%HH%M) ][INFO][LOAD]LOAD MOUNTED WALLET as ref to stacke" | & tee -a $PATH_LOGS_MASSAGUARD /$( date +%Y%m%d) -massa_guard.txt
91
- fi
92
- # If unreachable node file dont exist
93
- if [ ! -e $PATH_CONF_MASSAGUARD /bootstrappers_unreachable.txt ]
94
- then
95
- # Create bootstrappers_unreachable.txt
96
- touch $PATH_CONF_MASSAGUARD /bootstrappers_unreachable.txt
97
- fi
84
+ fi
You can’t perform that action at this time.
0 commit comments