Skip to content

Commit

Permalink
fix: Synology DSM API path regex
Browse files Browse the repository at this point in the history
Fix the regex for looking up the API path value from the Synology API query.
  • Loading branch information
winromulus committed Sep 25, 2023
1 parent 59f976d commit 87a7bde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/synology_dsm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ synology_dsm_deploy() {

_debug "Getting API version"
response=$(_get "$_base_url/webapi/query.cgi?api=SYNO.API.Info&version=1&method=query&query=SYNO.API.Auth")
api_path=$(echo "$response" | grep "SYNO.API.Auth" | sed -n 's/.*"path" *: *"\([0-9]*\)".*/\1/p')
api_path=$(echo "$response" | grep "SYNO.API.Auth" | sed -n 's/.*"path" *: *"\([^"]*\)".*/\1/p')
api_version=$(echo "$response" | grep "SYNO.API.Auth" | sed -n 's/.*"maxVersion" *: *\([0-9]*\).*/\1/p')
_debug3 response "$response"
_debug3 api_path "$api_path"
Expand Down

0 comments on commit 87a7bde

Please sign in to comment.