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
80f1034d
Commit
80f1034d
authored
Mar 08, 2020
by
Markus Lippert
Browse files
add OTP support
parent
902c08e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy/synology_dsm.sh
View file @
80f1034d
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
# SYNO_Scheme - defaults to http
# SYNO_Scheme - defaults to http
# SYNO_Hostname - defaults to localhost
# SYNO_Hostname - defaults to localhost
# SYNO_Port - defaults to 5000
# SYNO_Port - defaults to 5000
# SYNO_DID - device ID to skip OTP - defaults to empty
#
#
#returns 0 means success, otherwise error.
#returns 0 means success, otherwise error.
...
@@ -79,7 +80,7 @@ synology_dsm_deploy() {
...
@@ -79,7 +80,7 @@ synology_dsm_deploy() {
# Login, get the token from JSON and session id from cookie
# Login, get the token from JSON and session id from cookie
_info
"Logging into
$SYNO_Hostname
:
$SYNO_Port
"
_info
"Logging into
$SYNO_Hostname
:
$SYNO_Port
"
response
=
$(
_get
"
$_base_url
/webman/login.cgi?username=
$SYNO_Username
&passwd=
$SYNO_Password
&enable_syno_token=yes"
)
response
=
$(
_get
"
$_base_url
/webman/login.cgi?username=
$SYNO_Username
&passwd=
$SYNO_Password
&enable_syno_token=yes
&device_id=
$SYNO_DID
"
)
token
=
$(
echo
"
$response
"
|
grep
"SynoToken"
|
sed
-n
's/.*"SynoToken" *: *"\([^"]*\).*/\1/p'
)
token
=
$(
echo
"
$response
"
|
grep
"SynoToken"
|
sed
-n
's/.*"SynoToken" *: *"\([^"]*\).*/\1/p'
)
_debug3 response
"
$response
"
_debug3 response
"
$response
"
...
...
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