salt-relay import-file reporting

On successful import, return dashboard URL
This commit is contained in:
Corey Ogburn
2023-05-31 09:47:52 -06:00
parent a465039887
commit 49055e260f

View File

@@ -232,8 +232,8 @@ function import_file() {
log "Exit Code: $exit_code"
if [[ exit_code -eq 0 ]]; then
log "true"
$(echo "true" > "${SOC_PIPE}")
url=$(echo "$response" | sed ':a;N;$!ba;s/\n//g' | grep -E -o "https://\S*&z=UTC")
$(echo "$url" > "${SOC_PIPE}")
else
log "false"
$(echo "false" > "${SOC_PIPE}")