Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/ruby
- SERVER = ARGV[0] || 'www.example.com'
- PORT = '24800'
- system "ssh -f -n -N -L localhost:#{PORT}:#{SERVER}:#{PORT} #{SERVER}" unless (`pidof ssh`.split.any? { |pid| File.read("/proc/#{pid}/cmdline").include? PORT })
- exec 'synergyc localhost'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement