In my environment, the curl -X HEAD -f -i command line kibana_ctl script does not work properly. It is in an infinite wait state instead of receiving a response.
Instead, the curl -I -f command line works correctly. If you look at the following site, it would be more appropriate to use -I than -X HEAD
https://serverfault.com/questions/140149/difference-between-curl-i-and-curl-x-head
So I suggest you modify this script. what do you think?