Skip to content

Commit

Permalink
Create otp
Browse files Browse the repository at this point in the history
Bash file to run the token generator
  • Loading branch information
qwelyt committed Apr 23, 2015
1 parent 1810264 commit fcf09c2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions otp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
scriptname=$(basename $0)
if [ -z $1 ]
then
echo "$scriptname: Service Name Needed"
echo ""
echo "Usage:"
echo " otp google"
echo ""
echo "Configuration: $HOME/.otpkeys"
echo "Format: name=key"
exit
fi
otpkey=$(cat "$HOME/.otpkeys" | grep "$1" | cut -d"=" -f 2 | sed "s/ //g")
if [ -z "$otpkey" ]
then
echo "$scriptname: Bad Service Name"
exit
fi
/usr/bin/python token.py --totp "$otpkey"

0 comments on commit fcf09c2

Please sign in to comment.