Browse Source

Fix variable initialization

pull/4646/head
Martin Arndt 1 year ago
committed by GitHub
parent
commit
0d7b831661
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      deploy/synology_dsm.sh

3
deploy/synology_dsm.sh

@ -100,6 +100,7 @@ synology_dsm_deploy() {
encoded_username="$(printf "%s" "$SYNO_Username" | _url_encode)" encoded_username="$(printf "%s" "$SYNO_Username" | _url_encode)"
encoded_password="$(printf "%s" "$SYNO_Password" | _url_encode)" encoded_password="$(printf "%s" "$SYNO_Password" | _url_encode)"
otp_code=""
# START - DEPRECATED, only kept for legacy compatibility reasons # START - DEPRECATED, only kept for legacy compatibility reasons
if [ -n "$SYNO_TOTP_SECRET" ]; then if [ -n "$SYNO_TOTP_SECRET" ]; then
_info "WARNING: Usage of SYNO_TOTP_SECRET is deprecated!" _info "WARNING: Usage of SYNO_TOTP_SECRET is deprecated!"
@ -119,7 +120,7 @@ synology_dsm_deploy() {
_debug3 H1 "${_H1}" _debug3 H1 "${_H1}"
fi fi
response=$(_post "method=login&account=$encoded_username&passwd=$encoded_password&api=SYNO.API.Auth&version=$api_version&enable_syno_token=yes&otp_code=$otp_code&device_name=certrenewal&device_id=$SYNO_DID" "$_base_url/webapi/auth.cgi?enable_syno_token=yes")
response=$(_post "method=login&account=$encoded_username&passwd=$encoded_password&api=SYNO.API.Auth&version=$api_version&enable_syno_token=yes&otp_code=$DEPRECATED_otp_code&device_name=certrenewal&device_id=$SYNO_DID" "$_base_url/webapi/auth.cgi?enable_syno_token=yes")
_debug3 response "$response" _debug3 response "$response"
# END - DEPRECATED, only kept for legacy compatibility reasons # END - DEPRECATED, only kept for legacy compatibility reasons
# Get device ID if still empty first, otherwise log in right away # Get device ID if still empty first, otherwise log in right away

Loading…
Cancel
Save