bc command check and version update in config file in evernode update (#138)

* Version upgrade in config file.
* Check whether bc utility is installed.
This commit is contained in:
Savinda Senevirathne
2022-05-09 20:54:59 +05:30
committed by GitHub
parent 15ff8fd700
commit 281dd18bd7
2 changed files with 10 additions and 0 deletions

View File

@@ -171,6 +171,10 @@ else
! $SASHIMONO_BIN/sagent new $SASHIMONO_DATA $inetaddr $inst_count $cpuMicroSec $ramKB $swapKB $diskKB && rollback
fi
if [[ "$NO_MB" == "" && -f $MB_XRPL_DATA/mb-xrpl.cfg ]]; then
! sudo -u "$MB_XRPL_USER" MB_DATA_DIR="$MB_XRPL_DATA" node "$MB_XRPL_BIN" upgrade && rollback
fi
# Install Sashimono Agent systemd service.
# StartLimitIntervalSec=0 to make unlimited retries. RestartSec=5 is to keep 5 second gap between restarts.
echo "[Unit]

View File

@@ -521,6 +521,12 @@ if [ "$mode" == "install" ]; then
check_sys_req
# Check bc command is installed.
if ! command -v bc &>/dev/null; then
echo "bc command not found. Installing.."
apt-get -y install bc >/dev/null
fi
# Display licence file and ask for concent.
printf "\n*****************************************************************************************************\n\n"
curl --silent $licence_url | cat