$ service tomcat start $ /etc/init.d/tomcat startUnfortunately they will not work if you try something like:
$ ssh -t remoteserver sudo /etc/init.d/tomcat startThat is what ultimately happens when you try to restart tomcat from a POB recipe using Remoto-IT as well.
SolutionThe tomcat/bin/startup.sh script needs to be modified to use the nohup command like:
$ vi /opt/tomcat/bin/startup.sh ... exec nohup "$PRGDIR"/"$EXECUTABLE" start "$@"The reason for this issue is that when the command is run remotely the logout signal causes the tomcat process to be killed as it depends on a terminal session that is to be closed. The command nohup allows the process to be detached from its parent (terminal), basically the process becomes a daemon.