add run with agent script
to avoid having to enter the password for the ssh key more than once
This commit is contained in:
15
run_with_agent.sh
Executable file
15
run_with_agent.sh
Executable 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
|
||||||
Reference in New Issue
Block a user