Skip to content

Commit

Permalink
export keys on reset
Browse files Browse the repository at this point in the history
  • Loading branch information
inv4fee2020 committed Oct 19, 2023
1 parent 0c6e0bb commit e2c6f59
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pli_node_scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -664,17 +664,21 @@ echo
echo

if [ ! -e $PLI_DEPLOY_PATH/pass ]; then
echo $PASS_KEYSTORE > $PLI_DEPLOY_PATH/pass
chmod 400 $PLI_DEPLOY_PATH/pass
#echo $PASS_KEYSTORE > $PLI_DEPLOY_PATH/pass
echo $PASS_KEYSTORE > /tmp/pass
#chmod 400 $PLI_DEPLOY_PATH/pass
chmod 400 /tmp/pass
fi

plugin keys eth export $node_key_primary --newpassword $PLI_DEPLOY_PATH/pass --output ~/"plinode_$(hostname -f)_keys_${FDATE}".json > /dev/null 2>&1
plugin keys eth export $node_key_primary --newpassword /tmp/pass --output ~/"plinode_$(hostname -f)_keys_${FDATE}".json > /dev/null 2>&1

#echo -e "${GREEN} export ${BYELLOW}$_OPTION${GREEN} node keys - securing file permissions${NC}"
chmod 400 ~/"plinode_$(hostname -f)_keys_${FDATE}".json

#chmod 600 $PLI_DEPLOY_PATH/pass
rm -f $PLI_DEPLOY_PATH/pass
#rm -f $PLI_DEPLOY_PATH/pass
chmod 600 /tmp/pass
rm -f /tmp/pass
sleep 4s
}

Expand Down

0 comments on commit e2c6f59

Please sign in to comment.