Skip to content

Instantly share code, notes, and snippets.

View joeymink's full-sized avatar

Joey Mink joeymink

View GitHub Profile
@joeymink
joeymink / tomcat.sh
Last active December 25, 2015 17:39 — forked from valotas/tomcat.sh
#!/bin/bash
#
# my_app This shell script takes care of starting and stopping my_app
#
# chkconfig: - 80 20
#
### BEGIN INIT INFO
# Provides: my_app
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
# run as non privileged user
# add user with this command:
## adduser --system --ingroup www-data --home /opt/apache-tomcat apache-tomcat