From 4b1fccf0f46d47bb9ad30de8d8634c5669f434a3 Mon Sep 17 00:00:00 2001 From: Niks988 Date: Mon, 4 Sep 2023 14:26:05 +0200 Subject: [PATCH] bugfix - npm command improved with proper installation version --- installer/installer.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/installer/installer.sh b/installer/installer.sh index ba6a78771b..b9d090e96d 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -87,7 +87,7 @@ install_prereqs() { rm -rf setup_$NODEJS_VER.x perform_step apt update "Updating Ubuntu package repository" perform_step apt-get install nodejs -y "Installing node.js" - perform_step npm install -g npm "Installing npm" + perform_step npm install -g npm@^8 "Installing npm" perform_step install_firewall "Configuring firewall" perform_step apt remove unattended-upgrades -y "Remove unattended upgrades" } @@ -263,9 +263,9 @@ install_node() { perform_step touch $CONFIG_DIR/.origintrail_noderc "Configuring node config file" perform_step $(jq --null-input --arg tripleStore "$tripleStore" '{"logLevel": "trace", "auth": {"ipWhitelist": ["::1", "127.0.0.1"]}}' > $CONFIG_DIR/.origintrail_noderc) "Adding loglevel and auth values to node config file" - perform_step $(jq --arg tripleStore "$tripleStore" --arg tripleStoreUrl "$tripleStoreUrl" '.modules.tripleStore.implementation[$tripleStore] |= + perform_step $(jq --arg tripleStore "$tripleStore" --arg tripleStoreUrl "$tripleStoreUrl" '.modules.tripleStore.implementation[$tripleStore] |= { - "enabled": "true", + "enabled": "true", "config": { "repositories": { "privateCurrent": { @@ -293,24 +293,24 @@ install_node() { "password": "" } } - } + } } + .' $CONFIG_DIR/.origintrail_noderc > $CONFIG_DIR/origintrail_noderc_tmp) "Adding node wallets to node config file 1/2" perform_step mv $CONFIG_DIR/origintrail_noderc_tmp $CONFIG_DIR/.origintrail_noderc "Adding node wallets to node config file 2/2" - - perform_step $(jq --arg blockchain "otp" --arg evmOperationalWallet "$EVM_OPERATIONAL_WALLET" --arg evmOperationalWalletPrivateKey "$EVM_OPERATIONAL_PRIVATE_KEY" --arg evmManagementWallet "$EVM_MANAGEMENT_WALLET" --arg evmManagementWallet "$SHARES_TOKEN_NAME" --arg evmManagementWallet "$SHARES_TOKEN_SYMBOL" --arg sharesTokenName "$SHARES_TOKEN_NAME" --arg sharesTokenSymbol "$SHARES_TOKEN_SYMBOL" '.modules.blockchain.implementation[$blockchain].config |= - { - "evmOperationalWalletPublicKey": $evmOperationalWallet, - "evmOperationalWalletPrivateKey": $evmOperationalWalletPrivateKey, - "evmManagementWalletPublicKey": $evmManagementWallet, - "sharesTokenName": $sharesTokenName, + + perform_step $(jq --arg blockchain "otp" --arg evmOperationalWallet "$EVM_OPERATIONAL_WALLET" --arg evmOperationalWalletPrivateKey "$EVM_OPERATIONAL_PRIVATE_KEY" --arg evmManagementWallet "$EVM_MANAGEMENT_WALLET" --arg evmManagementWallet "$SHARES_TOKEN_NAME" --arg evmManagementWallet "$SHARES_TOKEN_SYMBOL" --arg sharesTokenName "$SHARES_TOKEN_NAME" --arg sharesTokenSymbol "$SHARES_TOKEN_SYMBOL" '.modules.blockchain.implementation[$blockchain].config |= + { + "evmOperationalWalletPublicKey": $evmOperationalWallet, + "evmOperationalWalletPrivateKey": $evmOperationalWalletPrivateKey, + "evmManagementWalletPublicKey": $evmManagementWallet, + "sharesTokenName": $sharesTokenName, "sharesTokenSymbol": $sharesTokenSymbol } + .' $CONFIG_DIR/.origintrail_noderc > $CONFIG_DIR/origintrail_noderc_tmp) "Adding node wallets to node config file 1/2" - + perform_step mv $CONFIG_DIR/origintrail_noderc_tmp $CONFIG_DIR/.origintrail_noderc "Adding node wallets to node config file 2/2" perform_step cp $OTNODE_DIR/installer/data/otnode.service /lib/systemd/system/ "Copying otnode service file" - + systemctl daemon-reload perform_step systemctl enable otnode "Enabling otnode" perform_step systemctl start otnode "Starting otnode" @@ -411,4 +411,4 @@ If the logs do not show and the screen hangs, press ctrl+c to exit the installat " read -p "Press enter to continue..." -journalctl -u otnode --output cat -fn 200 \ No newline at end of file +journalctl -u otnode --output cat -fn 200