Elasticsearch startup, setting default heap size

New user on this forum, just started using Elasticsearch.

My question revolves around the proper way to set heap size @ startup in an automated manor.

The infrastructure in place that I've inherited does a yum install and build settings with a python script. All is good and well, but we need bump up the default heap size and I'm having problems with that setting in the startup.

Tried just setting it in bashrc, but export does not set it for the startup at the end of the script...
Short of another script editing the default configs, is there another method that is recommended?

/etc/sysconfig/elasticsearch is the usual spot for this.

Thanks Nik - I guess a simple sed would work if that is the spot! Appreciate it...

Or /etc/default/elasticsearch on Debian based systems.