Skip to content

Instantly share code, notes, and snippets.

@liejuntao001
Created June 11, 2019 19:20
Show Gist options
  • Save liejuntao001/bc063fe3b667c770bcb200e727b2b652 to your computer and use it in GitHub Desktop.
Save liejuntao001/bc063fe3b667c770bcb200e727b2b652 to your computer and use it in GitHub Desktop.
#!/bin/bash
cmd=$@
command="echo $cmd | sudo socat stdio /run/haproxy/admin.sock"
ssh -o StrictHostKeyChecking=no haproxy $command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment