This gist has moved to its own repository HERE
See you there!
This gist has moved to its own repository HERE
See you there!
#!/usr/bin/env bash | |
# ssh targets and log search pattern | |
user="root" # remote ssh user | |
hostlist="host1.example.com host2.example.com host3.example.com" # space-separated ssh hosts list | |
remote_logfile="/var/log/syslog" | |
search_pattern="Session" # can use regexps here (grep -E) | |
# trap ctrl-c for named pipe cleanup and ssh process killing | |
trap 'echo -e "\n\nCleaning up..."; for pid in $children; do kill -9 $pid 2>/dev/null; done; rm "$HOME/tailpipe"; exit 0' INT |