Stop with another file

Enonic version: xp 6.0.0
OS: Ubuntu Server 14.04.1

How can I stop the script when started with a demon in system startup? , exist a


I guess there is no shutdown script, but if you know the PID of the java process started by script you can just use KILL.

If you have a startup script that starts the server as a daemon on ubuntu you should be able to use the same script to stop it.


1 Like

Right after you started and put it the background, you can get the pid for the running prosess by fetching the variable “$!”. Save this variable as a file and you kan execute a "kill " top stop the service like this:

./ &
echo $! >
kill $(cat )