Configure Tomcat as a deamon on Linux
Since I keep on forgetting how to do this I decided to put this on my blog to make it easier for me and other people that have the same issue as me. It's pretty simple actually but yesterday I caught myself forgetting how it needs to be done. Basically you need to follow to following steps to successfully. Step 1 - Creating startup deamon file You can take the following file and adjust it accordingly. You have to create this file in /etc/init.d/. #Jenkins startup script #!/bin/sh -e #Jenkins startup script #chkconfig: 2345 80 05 #description: Jenkins CI # Define some variables # Name of app APP=Jenkins # Name of the user to run as USER=tomcat # Location of application's bin directory BASE=/var/tomcat/instances/jenkins # Location of Java JDK export JAVA_HOME=/opt/java/jdk1.6.0_11 case "$1" in # Start command start) echo "Starting $APP" /bin/su -m $USER -c "cd $BASE/logs && $BASE/bin/startup.sh &> /dev/null" ;; # Stop...