Apply defaults the oathtool command when get-ing codes
This commit is contained in:
parent
b3a9d1010b
commit
38aa163634
1 changed files with 1 additions and 1 deletions
2
otpish
2
otpish
|
@ -72,7 +72,7 @@ if [ "${COMMAND}" = "get" ]; then
|
|||
if [ "$(echo ${i} | cut -d'=' -f1)" = "digits" ]; then digits=$(echo ${i} | cut -d'=' -f2); fi
|
||||
if [ "$(echo ${i} | cut -d'=' -f1)" = "period" ]; then period=$(echo ${i} | cut -d'=' -f2); fi
|
||||
done
|
||||
oathtool --totp -b -s "${period}s" -d ${digits} ${secret}
|
||||
oathtool --totp -b -s "${period:-30}s" -d ${digits:-6} ${secret}
|
||||
exit
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue