Add ssh-agent to msync script
This commit is contained in:
parent
1de5d2478d
commit
1d95f1ca2f
@ -18,6 +18,17 @@ fi
|
|||||||
if [ $ACTION = RECV ]
|
if [ $ACTION = RECV ]
|
||||||
then
|
then
|
||||||
# Move files to the quarantine zone for categorisation and renaming
|
# Move files to the quarantine zone for categorisation and renaming
|
||||||
|
|
||||||
|
# Setup ssh agent to avoid repeated password prompts
|
||||||
|
eval `ssh-agent -s`
|
||||||
|
ssh-add ~/.ssh/keys/beryllium_n
|
||||||
|
|
||||||
rsync -avPzc beryllium:~/storage/pictures/Infinity/ ~/med/memes/woof/quar && \
|
rsync -avPzc beryllium:~/storage/pictures/Infinity/ ~/med/memes/woof/quar && \
|
||||||
ssh beryllium "rm -I storage/pictures/Infinity/*"
|
ssh beryllium "rm -I storage/pictures/Infinity/*"
|
||||||
|
|
||||||
|
rsync -avPzc beryllium:~/storage/movies/Infinity/ ~/med/memes/woof/quar && \
|
||||||
|
ssh beryllium "rm -I storage/movies/Infinity/*"
|
||||||
|
|
||||||
|
# Kill ssh agent
|
||||||
|
kill $SSH_AGENT_PID
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user