Starting and stopping elasticsearch without root privileges in linux centOS

You can then just use kill to stop the process. You can also use a bash script if it's more convenient.
Make ES create a pid file when starting.

Then just kill the process.

kill $(cat {file_path})