Add err log for missing oathtool in Synology

Alerts the user that the oathtool is missing and the TOTP can't be
generated.
This commit is contained in:
John Elliott committed 2022-02-07 11:53:24 -08:00
1 parent af193291fa
commit 5ae3a020bd
1 file changed
+5
+5
View File
@@ -94,6 +94,11 @@ synology_dsm_deploy() {
otp_code=""
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)"
fi
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.