]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
Update truenas.sh
authorF-Plass <60349140+F-Plass@users.noreply.github.com>
Sun, 7 Feb 2021 17:42:48 +0000 (18:42 +0100)
committerF-Plass <60349140+F-Plass@users.noreply.github.com>
Sun, 7 Feb 2021 17:42:48 +0000 (18:42 +0100)
deploy/truenas.sh

index 8ccf226af7dbedb94d5c7c5c4dce2cf9446407b0..37ddb2b059e252f34b66868c6184dce6aeaa475e 100644 (file)
@@ -179,9 +179,18 @@ truenas_deploy() {
 
 
   _info "Reload WebUI from TrueNAS"
-  _restart_UI=$(_get "$_api_url/system/general/ui_restart")
-
-  _debug3 _restart_UI "$_restart_UI"
-
-  return 0
+  # the command
+  # _restart_UI=$(_get "$_api_url/system/general/ui_restart")
+  # throws the Error 52
+  # for this command direct curl command
+  curl --silent -L --no-keepalive --user-agent "$USER_AGENT" -H "$_H1" "$_api_url/system/general/ui_restart"
+  ret=$?
+  _debug2 CURL_RETURN "$ret"
+
+  if [ -n "$_add_cert_result" ] && [ -n "$_activate_result" ] && [ "$ret" == "52" ]; then
+    return 0
+  else
+    _err "Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: $ret"
+    return 1
+  fi
 }