From 6e275780b137adcbd6311aaaf236dced581323e3 Mon Sep 17 00:00:00 2001 From: rdlrt <3169068+rdlrt@users.noreply.github.com> Date: Fri, 7 Jun 2024 13:55:04 +0000 Subject: [PATCH] Move mithril library call to be lower in the script --- scripts/cnode-helper-scripts/cnode.sh | 2 -- scripts/cnode-helper-scripts/mithril-client.sh | 4 ++-- scripts/cnode-helper-scripts/mithril-relay.sh | 4 ++-- scripts/cnode-helper-scripts/mithril-signer.sh | 6 +++--- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts/cnode-helper-scripts/cnode.sh b/scripts/cnode-helper-scripts/cnode.sh index 720f88ade..189dd21b1 100755 --- a/scripts/cnode-helper-scripts/cnode.sh +++ b/scripts/cnode-helper-scripts/cnode.sh @@ -2,8 +2,6 @@ # shellcheck disable=SC2086 #shellcheck source=/dev/null -. "$(dirname $0)"/env offline - ###################################### # User Variables - Change as desired # # Common variables set in env file # diff --git a/scripts/cnode-helper-scripts/mithril-client.sh b/scripts/cnode-helper-scripts/mithril-client.sh index 9c59716b0..c33e1f19a 100755 --- a/scripts/cnode-helper-scripts/mithril-client.sh +++ b/scripts/cnode-helper-scripts/mithril-client.sh @@ -2,8 +2,6 @@ # shellcheck disable=SC2086 #shellcheck source=/dev/null -. "$(dirname $0)"/mithril.library - ###################################### # User Variables - Change as desired # # Common variables set in env file # @@ -175,6 +173,8 @@ list_stake_distributions() { # Execution/Main # ##################### +. "$(dirname $0)"/mithril.library + update_check "$@" set_defaults diff --git a/scripts/cnode-helper-scripts/mithril-relay.sh b/scripts/cnode-helper-scripts/mithril-relay.sh index 0207856f4..f64c998d1 100755 --- a/scripts/cnode-helper-scripts/mithril-relay.sh +++ b/scripts/cnode-helper-scripts/mithril-relay.sh @@ -2,8 +2,6 @@ # shellcheck disable=SC2086 #shellcheck source=/dev/null -. "$(dirname $0)"/mithril.library - ###################################### # User Variables - Change as desired # # Common variables set in env file # @@ -254,6 +252,8 @@ if [[ ${OPTIND} -eq 1 ]]; then exit 1 fi +. "$(dirname $0)"/mithril.library + [[ "${STOP_RELAYS}" == "Y" ]] && stop_relays update_check "$@" diff --git a/scripts/cnode-helper-scripts/mithril-signer.sh b/scripts/cnode-helper-scripts/mithril-signer.sh index 82c0f27c0..f1ced6b9a 100755 --- a/scripts/cnode-helper-scripts/mithril-signer.sh +++ b/scripts/cnode-helper-scripts/mithril-signer.sh @@ -2,8 +2,6 @@ # shellcheck disable=SC2086 #shellcheck source=/dev/null -. "$(dirname $0)"/mithril.library - ###################################### # User Variables - Change as desired # # Common variables set in env file # @@ -188,6 +186,8 @@ while getopts :dDekrsuh opt; do esac done +. "$(dirname $0)"/mithril.library + [[ "${STOP_SIGNER}" == "Y" ]] && stop_signer # Check for updates @@ -230,4 +230,4 @@ else exit 1 fi fi -fi \ No newline at end of file +fi