Have a Spring Boot (1.5.4.RELEASE) based microservice which I deploy a jar to an AWS EC Instance (Linux environment). Now, I am also deploying an external log4j.properties file so I have to start the microservice like this:
java -jar myapp.jar -Dlogging.config=/path/to/log4j.properties
How can I configure this Spring Boot Microservice as a Linux service where I can start and stop it using these flags:
sudo service myapp start | stop | status | restart
Thank you very much.