README Japanese
It is assumed that pluginV2 is set up.
This is a function to switch httpUrl and wsUrl in config.toml.
git clone https://github.com/AoiToSouma/changeUrlPliNode.git
cd changeUrlPliNode
chmod +x *.sh
Copy sample.env and create a .env file.
Edit switchable httpUrl ($RPC_LIST) and wsUrl ($WS_LIST) or combination($PAIR_LIST).
Note that comment lines(#...) are ignored.
The httpUrl and wsUrl specified in the current config.toml must exist in the list.
An error will occur if it does not exist.
Edit other parameters as necessary.
cp sample.env .env
nano .env
Execution is performed using four types of parameters.
- Change only RPC(httpUrl)
Reference $RPC_LIST in .env.
./netset.sh -t rpc
- Change only WS(wsUrl)
Reference $WS_LIST in .env.
./netset.sh -t ws
- Change RPC(httpUrl) and WS(wsUrl)
Reference $RPC_LIST and $WS_LIST in .env.
./netset.sh -t both
- Change the combination of RPC(httpUrl) and WS(wsUrl).
Reference $PAIR_LIST in .env.
./netset.sh -t pair
After editing config.toml, perform "pm2 restart".
Then, check the log at the specified time pm2 and collect [ERROR] and [CRIT] messages.
The time to collect logs can be changed in .env.
If the following message is output to [PM2 Log error excerpt], switching has been completed without an error.
No errors occurred.
Switching completed successfully.