| #! /bin/sh | |
| case "${1}" in | |
| suspend|hibernate) | |
| ;; | |
| resume|thaw) | |
| lsof -t -i:24800 | |
| # Is synergy already running? Then kill existing ssh and synergy clients before reconnecting | |
| if [ $? -eq 0 ] | |
| then | |
| kill $(lsof -t -i:24800) | |
| fi | |
| # Now we know it's not running; so it's safe to restart it. | |
| ssh -N -f -L 24800:localhost:24800 david@192.168.1.100 | |
| synergyc localhost & | |
| ;; | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment