This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Handle passphrase for ssh, to avoid typing it everytime. | |
# Note that we don't use -delete as this won't work properly on | |
# FreeBSD and MacOSX, and we need to redirect stderr to avoid | |
# the 'No such file...' error message. | |
SSH_WITNESS_FILE="/tmp/is_ssh_passphrase_ok" | |
SSH_TTL=86400 | |
SSH_TTL_MINUTES=$((SSH_TTL / 60)) | |
find "$SSH_WITNESS_FILE" -cmin "+${SSH_TTL_MINUTES}" -type f \ | |
-exec rm -rf {} \; >/dev/null 2>/dev/null | |
if [ ! -f $SSH_WITNESS_FILE ]; then |