I did read somewhere about this where we can start/stop/restart opensearch as a service , but not able to find that link now.
Can someone please share the link or let me know how to make it work ?
currently i am starting/stopping using systemctl command like
Starting and stopping a service is a function of the OS and not of Opensearch itself. As all the recommended operating systems(Compatibility - OpenSearch documentation for 1.3 or Compatibility - OpenSearch documentation for 2.0) use Systemd as the init daemon, the systemctl commands you listed are the correct ones to start/stop the service. You should also be able use sudo systemctl restart opensearch.service to issue a restart to the Opensearch service.
The service command you referenced was used in an older init daemon called SystemV that is not used by any of the recommended operating systems for Opensearch.