I have a scenario where I need to call grpc micro service which will control the stop/start of a service running on Linux system.
Will be calling grpc micro service from java code.
Additional Info: Current code is calling “systemctl is-enabled/is-active/start/stop service_name” from java code and it works as long as this is running on host. But, am working on containerization where code is running in a pod container, hence systemctl is failing. Requirement here is to create grpc service, to control these “is-enabled/is-active/start/stop” actions and call grpc service from java code to achieve the desired result.
Can you someone suggest me the process of doing this from micro service.
Thanks
Thanks NobbZ for the comments.
This worked.
I am not sure if grpc client running on pod container, will have any issue if I use cmd.exec on grpc service. any comments on this ?