Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit 51ccf3e

Browse files
committed
Move pid to /var/run/stash/catalina.pid
1 parent a314d07 commit 51ccf3e

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

recipes/tomcat_configuration.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,10 @@
4545
mode '0644'
4646
notifies :restart, 'service[stash]', :delayed
4747
end
48+
49+
directory '/var/run/stash' do
50+
owner 'stash'
51+
group 'stash'
52+
mode '0755'
53+
action :create
54+
end

templates/default/3.8+/setenv.sh.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,9 @@ fi
288288
# set the location of the pid file
289289
if [ -z "$CATALINA_PID" ] ; then
290290
if [ -n "$CATALINA_BASE" ] ; then
291-
CATALINA_PID="$CATALINA_BASE"/work/catalina.pid
291+
CATALINA_PID=/var/run/stash/catalina.pid
292292
elif [ -n "$CATALINA_HOME" ] ; then
293-
CATALINA_PID="$CATALINA_HOME"/work/catalina.pid
293+
CATALINA_PID=/var/run/stash/catalina.pid
294294
fi
295295
fi
296296
export CATALINA_PID

templates/default/stash.init.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ case "$1" in
6464
status)
6565
<% case node['platform_family'] -%>
6666
<% when 'rhel' -%>
67-
status -p $BASE/work/catalina.pid $APP
67+
status -p /var/run/stash/catalina.pid $APP
6868
<% else -%>
69-
status_of_proc -p $BASE/work/catalina.pid $JAVA_HOME/bin/java $APP
69+
status_of_proc -p /var/run/stash/catalina.pid $JAVA_HOME/bin/java $APP
7070
<% end -%>
7171
RETVAL=$?
7272
;;
@@ -75,5 +75,5 @@ case "$1" in
7575
RETVAL=2
7676
;;
7777
esac
78-
78+
7979
exit $RETVAL

0 commit comments

Comments
 (0)