add run with agent script

to avoid having to enter the password for the ssh key more than once
This commit is contained in:
2025-12-24 11:48:47 -05:00
parent 267c97d180
commit 948dabc3d6

15
run_with_agent.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# save as run_with_agent.sh
# Start ssh agent if not already running
if [ -z "$SSH_AUTH_SOCK" ]; then
eval $(ssh-agent -s)
fi
# Add key if not already added
ssh-add -l | grep -q id_ed25519 || ssh-add ~/.ssh/id_ed25519
# Run your actual script
cd /home/eric/asset_tracker
./extract_assets.sh
./chart_asset_data.sh