Skip to content

Instantly share code, notes, and snippets.

@fritz0705
Created May 8, 2013 12:49
Show Gist options
  • Save fritz0705/5540223 to your computer and use it in GitHub Desktop.
Save fritz0705/5540223 to your computer and use it in GitHub Desktop.
Script to allow selection between bird and bird6 on SSH connect
#!/bin/bash
BIRD4="sudo /opt/bird/sbin/birdc"
BIRD6="sudo /opt/bird/sbin/birdc6"
BIRD=$BIRD4
case $SSH_ORIGINAL_COMMAND in
bird*4|ip*4)
BIRD=$BIRD4
;;
bird*6|ip*6)
BIRD=$BIRD6
;;
esac
exec $BIRD $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment