diff --git a/init.config b/init.config index 25833ae..45f092a 100755 --- a/init.config +++ b/init.config @@ -13,6 +13,9 @@ if [ -z "$nodeName" ]; then exit 1 fi +# Ensure the worker-data directory exists +mkdir -p ./worker-data + json_content=$(cat ./config.json) stringified_json=$(echo "$json_content" | jq -c .) @@ -25,9 +28,6 @@ if [ -n "$mnemonic" ]; then exit 1 fi -# Ensure the worker-data directory exists -mkdir -p ./worker-data - if [ ! -f ./worker-data/env_file ]; then echo "ENV_LOADED=false" > ./worker-data/env_file fi @@ -40,4 +40,4 @@ if [ "$ENV_LOADED" = "false" ]; then echo "config.json saved to ./worker-data/env_file" else echo "config.json is already loaded, skipping the operation. You can set ENV_LOADED variable to false in ./worker-data/env_file to reload the config.json" -fi \ No newline at end of file +fi \ No newline at end of file