Add installation checks for libraries & fix rpc link
This commit is contained in:
parent
fcc757cc6a
commit
ff4210d92f
@ -51,15 +51,18 @@ function install_requred_packages(){
|
||||
}
|
||||
|
||||
function install_node(){
|
||||
if ! command -v "nvm" &> $script_log_file; then
|
||||
curl -s -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash &>> $script_log_file;
|
||||
. ~/.nvm/nvm.sh;
|
||||
. ~/.profile;
|
||||
. ~/.bashrc;
|
||||
fi;
|
||||
|
||||
local required_node_version=16.20.2;
|
||||
nvm install $required_node_version &>> $script_log_file;
|
||||
nvm use $required_node_version &>> $script_log_file;
|
||||
if node -v | grep -qw $required_node_version; then
|
||||
echo $(node -v);
|
||||
if node -v | grep -q $required_node_version; then
|
||||
echo "Node $required_node_version successfully installed";
|
||||
else
|
||||
echo_log_err_and_exit "Cannot install node $required_node_version or node installed with error";
|
||||
@ -82,13 +85,17 @@ function install_node_dependencies(){
|
||||
}
|
||||
|
||||
function run_ipfs_daemon(){
|
||||
if ! command -v "ipfs" &> $script_log_file; then
|
||||
cd $tornado_folder;
|
||||
wget https://dist.ipfs.tech/kubo/v0.22.0/kubo_v0.22.0_linux-amd64.tar.gz &>> $script_log_file;
|
||||
tar -xvzf kubo_v0.22.0_linux-amd64.tar.gz;
|
||||
cd kubo;
|
||||
sudo bash install.sh &>> $script_log_file;
|
||||
ipfs init --profile server;
|
||||
fi;
|
||||
if ! ps aux | grep -w "ipfs daemon" | grep -v "grep"; then
|
||||
sudo -b ipfs daemon;
|
||||
fi;
|
||||
}
|
||||
|
||||
function configure_firewall(){
|
||||
@ -135,7 +142,7 @@ function add_to_cron(){
|
||||
function prepare_env(){
|
||||
cd $tornado_folder;
|
||||
delete_if_exists .env;
|
||||
local rpc_url="https://eth.llamarpc.com"l;
|
||||
local rpc_url="https://eth.llamarpc.com";
|
||||
echo "RPC_URL=$rpc_url" > .env;
|
||||
echo "ENS_ROOT_DOMAIN=tornadocash.eth" >> .env;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user