I followed the standard tutorials out there in Spring website and couple of private articles.
- create a symbolic link of the jar to /etc/init.d/
- service myapp start
The service starts but it starts just like a normal app in foreground. Just like I ran
java -jar myapp.jar on the terminal
How do I make it run in the background just like mainstream linux services
This is my script
sudo chmod 500 myapp.jar
sudo /path/to/myapp.jar /etc/init.d/myapp
And I run the service as
sudo service myapp start
This is now running the app in foreground holds up the console , instead of running as service