Error running curl command, return code -11!?

This is what is happening, HA is executing your script, but then it’s closing the process that’s executed the script before it’s completed causing the exit code -11, this is normal for scripts executing a restart of HomeAssistant ie: sudo systemctl restart home-assistant.service. Per @subjectbit he changed to command line switches to resolve his issue in the docker container:

You may need to use this for yours as well.

With me happens with all scripts no matter whether with CL switch or command line … Use scripts for telegram and octoprint

I know this was “solved” with a workaround but it seems that 0.98 has finally fixed the issue:

I for one started using streaming component when it was released, and had no idea it could break so many unrelated things.

EDIT: just to clarify, when it sometimes did work and mostly didn’t, had to do with streaming. If I didn’t have streams “preloaded” and no camera stream was running, it would work, but right after starting a stream it wouldn’t. I had the same behaviour with a custom component that scanned bluetooth LE tags, with a stream running it would just not work. I haven’t tried that now as I have a raspberry doing that.