Created
May 8, 2013 12:49
-
-
Save fritz0705/5540223 to your computer and use it in GitHub Desktop.
Script to allow selection between bird and bird6 on SSH connect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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