From 637747beadc4393a22bcd4d32f52e6073a0ed08c Mon Sep 17 00:00:00 2001 From: Lars Kolbowski Date: Sat, 3 Oct 2020 13:45:44 +0200 Subject: [PATCH] change MN_CONF_ENABLED to check for masternodeblsprivkey masternode option is deprecated: 'Warning: -masternode option is deprecated and ignored, specifying -masternodeblsprivkey is enough to start this node as a masternode' --- lib/dashman_functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dashman_functions.sh b/lib/dashman_functions.sh index 1ecd8c6..2dd33b2 100755 --- a/lib/dashman_functions.sh +++ b/lib/dashman_functions.sh @@ -209,7 +209,7 @@ _check_dependencies() { (which perl 2>&1) >/dev/null || MISSING_DEPENDENCIES="${MISSING_DEPENDENCIES}perl " (which git 2>&1) >/dev/null || MISSING_DEPENDENCIES="${MISSING_DEPENDENCIES}git " - MN_CONF_ENABLED=$( egrep -s '^[^#]*\s*masternode\s*=\s*1' $HOME/.dash{,core}/dash.conf | wc -l 2>/dev/null) + MN_CONF_ENABLED=$( egrep -s '^[^#]*\s*masternodeblsprivkey\s*=' $HOME/.dash{,core}/dash.conf | wc -l 2>/dev/null) if [ $MN_CONF_ENABLED -gt 0 ] ; then (which unzip 2>&1) >/dev/null || MISSING_DEPENDENCIES="${MISSING_DEPENDENCIES}unzip " (which virtualenv 2>&1) >/dev/null || MISSING_DEPENDENCIES="${MISSING_DEPENDENCIES}python-virtualenv " @@ -618,7 +618,7 @@ update_dashd(){ # poll it ---------------------------------------------------------------- - MN_CONF_ENABLED=$( egrep -s '^[^#]*\s*masternode\s*=\s*1' $INSTALL_DIR/dash.conf | wc -l 2>/dev/null) + MN_CONF_ENABLED=$( egrep -s '^[^#]*\s*masternodeblsprivkey\s*=' $INSTALL_DIR/dash.conf | wc -l 2>/dev/null) if [ $MN_CONF_ENABLED -gt 0 ] ; then # populate it -------------------------------------------------------- @@ -1057,7 +1057,7 @@ get_dashd_status(){ MN_PROTX_QUEUE_POSITION=0 MN_PROTX_SERVICE_VALID=0 - MN_CONF_ENABLED=$( egrep -s '^[^#]*\s*masternode\s*=\s*1' $HOME/.dash{,core}/dash.conf | wc -l 2>/dev/null) + MN_CONF_ENABLED=$( egrep -s '^[^#]*\s*masternodeblsprivkey\s*=' $HOME/.dash{,core}/dash.conf | wc -l 2>/dev/null) #MN_STARTED=`$DASH_CLI masternode status 2>&1 | grep 'successfully started' | wc -l` MN_REGISTERED=0 [[ -z "$MN_PROTX_RECORD" ]] || MN_REGISTERED=1