Skip to content

Commit

Permalink
vpndocker func
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Papperello committed Feb 7, 2019
1 parent 3a65f7d commit baf10a0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ if [[ -n $TMUX ]]; then
fi
}

function vpndocker() {
if [[ `stat -c '%a' /dev/net/tun` == '660' ]]; then
docker "$@"
else
echo 'lxc config device add penguin tun unix-char path=/dev/net/tun' | xclip -selection c
echo 'no access to /dev/net/tun'
fi
}

ec2-info() {
IP=169.254.169.254
ssh $1 "curl -q http://$IP/latest/meta-data/$2" 2>/dev/null
Expand Down

0 comments on commit baf10a0

Please sign in to comment.