Browse Source

Add err log for missing oathtool in Synology

Alerts the user that the oathtool is missing and the TOTP can't be
generated.
pull/3928/head
John Elliott 3 years ago
parent
commit
5ae3a020bd
  1. 5
      deploy/synology_dsm.sh

5
deploy/synology_dsm.sh

@ -94,6 +94,11 @@ synology_dsm_deploy() {
otp_code="" otp_code=""
if [ -n "$SYNO_TOTP_SECRET" ]; then if [ -n "$SYNO_TOTP_SECRET" ]; then
if ! command -v oathtool &> /dev/null
then
_err "oathtool could not be found, install oathtool to use SYNO_TOTP_SECRET"
exit 1
fi
otp_code="$(oathtool --base32 --totp "${SYNO_TOTP_SECRET}" 2>/dev/null)" otp_code="$(oathtool --base32 --totp "${SYNO_TOTP_SECRET}" 2>/dev/null)"
fi fi

Loading…
Cancel
Save