Skip to content

Instantly share code, notes, and snippets.

@zackramjan
Created May 31, 2020 05:58
Show Gist options
  • Save zackramjan/4538a891dcf7a4b8d3428fbf375e0b7e to your computer and use it in GitHub Desktop.
Save zackramjan/4538a891dcf7a4b8d3428fbf375e0b7e to your computer and use it in GitHub Desktop.
#!/bin/vbash
source /opt/vyatta/etc/functions/script-template
balanceA=${1:-100}
balanceB="$((100-$balanceA))"
configure
set load-balance group G interface eth0 weight $balanceA
set load-balance group G interface eth1 weight $balanceB
commit
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment