Skip to content

Commit

Permalink
MAINT: group usage of shared key, use exported helper
Browse files Browse the repository at this point in the history
  • Loading branch information
ZLLentz committed Mar 8, 2024
1 parent 7be3b17 commit b5391d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions scripts/bootstrap_plc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ fi
# Create an ssh key, if it does not already exist
if [ ! -f "${SSH_KEY_FILENAME}" ]; then
ssh-keygen -t rsa -f "${SSH_KEY_FILENAME}"
chmod g+r "${SSH_KEY_FILENAME}"
fi

# Register the ssh key with the ssh agent if needed
Expand Down
5 changes: 1 addition & 4 deletions scripts/setup_new_plc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,4 @@ source "${THIS_DIR}/ssh_agent_helper.sh"
"${THIS_DIR}"/provision_plc.sh "${1}"

# Stop the ssh agent if we started it here
if [ "${HELPER_STARTED_AGENT}" = "YES" ] && [ -n "${SSH_AGENT_PID}" ]; then
echo "Cleaning up SSH agent."
kill "${SSH_AGENT_PID}"
fi
ssh_agent_helper_cleanup

0 comments on commit b5391d4

Please sign in to comment.