Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
b793dbf9
Unverified
Commit
b793dbf9
authored
Aug 11, 2023
by
Martin Arndt
Committed by
GitHub
Aug 11, 2023
Browse files
Fix device ID property name for DSM 6
parent
d52b3877
Changes
1
Show whitespace changes
Inline
Side-by-side
deploy/synology_dsm.sh
View file @
b793dbf9
...
@@ -136,8 +136,11 @@ synology_dsm_deploy() {
...
@@ -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
"
_secure_debug3 response
"
$response
"
SYNO_Device_ID
=
$(
echo
"
$response
"
|
grep
"device_id"
|
sed
-n
's/.*"device_id" *: *"\([^"]*\).*/\1/p'
)
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
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment