Skip to content

Commit

Permalink
Editing tomcat init.d
Browse files Browse the repository at this point in the history
  • Loading branch information
maheshkharwadkar authored Oct 8, 2017
1 parent 39e7dc7 commit bd71bdc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ansible/firstplaybook/roles/tomcat/templates/tomcat.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ export JAVA_HOME="{{ tomcat.java.home }}"
export CATALINA_HOME="{{ tomcat.catalina.home }}"
export CATALINA_PID="{{ tomcat.catalina.pid }}"

SU="su"

start() {
isrunning

Expand All @@ -23,7 +21,7 @@ start() {
# Remove pidfile if still around
test -f $CATALINA_PID && rm -f $CATALINA_PID

$CATALINA_HOME/bin/catalina.sh start > /dev/null
sh $CATALINA_HOME/bin/catalina.sh start > /dev/null
}

stop() {
Expand All @@ -39,7 +37,7 @@ stop() {

count=0
until [ "$pid" = "" ] || [ $count -gt $SHUTDOWN_WAIT ]; do
$CATALINA_HOME/bin/catalina.sh stop -force > /dev/null
$SU $APP_USER -c "$CATALINA_HOME/bin/catalina.sh stop -force" > /dev/null
findpid

echo -n "."
Expand Down

0 comments on commit bd71bdc

Please sign in to comment.