Browse Source
Fix device ID property name for DSM 6
pull/4728/head
Martin Arndt
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
2 deletions
-
deploy/synology_dsm.sh
|
@ -136,8 +136,11 @@ synology_dsm_deploy() { |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
response=$(_get "$_base_url/webapi/$api_path?api=SYNO.API.Auth&version=$api_version&method=login&format=sid&account=$encoded_username&passwd=$encoded_password&otp_code=$otp_code&enable_syno_token=yes&enable_device_token=yes&device_name=$SYNO_Device_Name") |
|
|
response=$(_get "$_base_url/webapi/$api_path?api=SYNO.API.Auth&version=$api_version&method=login&format=sid&account=$encoded_username&passwd=$encoded_password&otp_code=$otp_code&enable_syno_token=yes&enable_device_token=yes&device_name=$SYNO_Device_Name") |
|
|
_debug3 response "$response" |
|
|
|
|
|
SYNO_Device_ID=$(echo "$response" | grep "device_id" | sed -n 's/.*"device_id" *: *"\([^"]*\).*/\1/p') |
|
|
|
|
|
|
|
|
_secure_debug3 response "$response" |
|
|
|
|
|
|
|
|
|
|
|
id_property='device_id' |
|
|
|
|
|
[ "${api_version}" -gt '6' ] || id_property='did' |
|
|
|
|
|
SYNO_Device_ID=$(echo "$response" | grep "$id_property" | sed -n 's/.*"'$id_property'" *: *"\([^"]*\).*/\1/p') |
|
|
_secure_debug2 SYNO_Device_ID "$SYNO_Device_ID" |
|
|
_secure_debug2 SYNO_Device_ID "$SYNO_Device_ID" |
|
|
else |
|
|
else |
|
|
response=$(_get "$_base_url/webapi/$api_path?api=SYNO.API.Auth&version=$api_version&method=login&format=sid&account=$encoded_username&passwd=$encoded_password&enable_syno_token=yes&device_name=$SYNO_Device_Name&device_id=$SYNO_Device_ID") |
|
|
response=$(_get "$_base_url/webapi/$api_path?api=SYNO.API.Auth&version=$api_version&method=login&format=sid&account=$encoded_username&passwd=$encoded_password&enable_syno_token=yes&device_name=$SYNO_Device_Name&device_id=$SYNO_Device_ID") |
|
|