diff --git a/installer/setup.sh b/installer/setup.sh index 046ec44..4b4e889 100755 --- a/installer/setup.sh +++ b/installer/setup.sh @@ -69,6 +69,7 @@ tls_cabundle_file="self" description="-" fallback_rippled_servers="-" + reimburse_frequency="-" # export vars used by Sashimono installer. export USER_BIN=/usr/bin @@ -2104,6 +2105,21 @@ WantedBy=timers.target" >/etc/systemd/system/$EVERNODE_AUTO_UPDATE_SERVICE.timer [ $(stat -c "%a" "$host_key_parent_directory") != "550" ] && chmod -R 550 "$host_key_parent_directory" [ $(stat -c "%a" "$host_key_file_path") != "440" ] && chmod 440 "$host_key_file_path" + if [ "$upgrade" == "0" ]; then + if confirm "\nWould you like to reimburse reputation account for reputation contract lease costs?"; then + while true; do + read -p "Enter the hours amount for reimbursement frequency: " -e reimburse_frequency /etc/systemd/system/$EVERNODE_AUTO_UPDATE_SERVICE.timer generate_qrcode "$reputationd_xrpl_address" - ! sudo -u $REPUTATIOND_USER REPUTATIOND_DATA_DIR=$REPUTATIOND_DATA node $REPUTATIOND_BIN new $reputationd_xrpl_address $reputationd_key_file_path && echo "Error creating configs" && return 1 + ! sudo -u $REPUTATIOND_USER REPUTATIOND_DATA_DIR=$REPUTATIOND_DATA node $REPUTATIOND_BIN new $reputationd_xrpl_address $reputationd_key_file_path $reimburse_frequency && echo "Error creating configs" && return 1 echomult "To set up your reputationd host account, ensure a deposit of $min_reputation_xah_requirement XAH to cover the regular transaction fees for the first three months." echomult "\nChecking the reputationd account condition." @@ -2534,6 +2550,8 @@ WantedBy=timers.target" >/etc/systemd/system/$EVERNODE_AUTO_UPDATE_SERVICE.timer reputationd_info echo "" ! sudo -u $REPUTATIOND_USER REPUTATIOND_DATA_DIR=$REPUTATIOND_DATA node $REPUTATIOND_BIN repinfo && echo "Error getting reputation status" && exit 1 + #elif [ "$2" == "reimburse" ]; then + #dulTest>>> add function to edit reputation.cfg's reimburseFrequency value. else echomult "ReputationD management tool \nSupported commands: diff --git a/mb-xrpl/lib/config-helper.js b/mb-xrpl/lib/config-helper.js index ef837d2..3ed2a11 100644 --- a/mb-xrpl/lib/config-helper.js +++ b/mb-xrpl/lib/config-helper.js @@ -28,6 +28,7 @@ class ConfigHelper { if (reputationDConfigPath && fs.existsSync(reputationDConfigPath)) { const reputationDConfig = JSON.parse(fs.readFileSync(reputationDConfigPath).toString()); config.xrpl.reputationAddress = reputationDConfig.xrpl.address; + config.reputationReimburseFrequency = reputationDConfig.reimburseFrequency; if (readSecret) { if (!fs.existsSync(reputationDConfig.xrpl.secretPath))