systemctl and bash script
by cormanstnl from LinuxQuestions.org on (#5M18E)
Hi all,
I have 2 bash scripts, one script start tomcat and a servlet
the second script stop the servlet and the tomcat daemon.
Because "systemctl" and I writed a systemctl unit who call theses scripts
ExecStart=/xxx/xxxxxxxxx/bin/start.sh
ExecStop=/xxx/xxxxxxxxx/bin/stop.sh
But if we need to just end the process and start the process, we use the bash scripts and not systemctl. That's mean that systemctl dont know the last start and maybe can say that the service is ok but in reality the process is ended.
So I would like to know if there some command for update systemctl status of the unit.
systemctl status xxxxxxxxx is more simple than a "ps", so if the information are not correct, is not usefull


I have 2 bash scripts, one script start tomcat and a servlet
the second script stop the servlet and the tomcat daemon.
Because "systemctl" and I writed a systemctl unit who call theses scripts
ExecStart=/xxx/xxxxxxxxx/bin/start.sh
ExecStop=/xxx/xxxxxxxxx/bin/stop.sh
But if we need to just end the process and start the process, we use the bash scripts and not systemctl. That's mean that systemctl dont know the last start and maybe can say that the service is ok but in reality the process is ended.
So I would like to know if there some command for update systemctl status of the unit.
systemctl status xxxxxxxxx is more simple than a "ps", so if the information are not correct, is not usefull