forked from habitat-sh/national-parks
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request habitat-sh#28 from chef-cft/sm/fix-plan
Update hooks
- Loading branch information
Showing
6 changed files
with
13 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,15 @@ | ||
#!/bin/bash -x | ||
|
||
debug() { | ||
if [ ! -z "$DEBUG" ]; then | ||
echo "$*" | ||
fi | ||
} | ||
|
||
echo "Preparing TOMCAT_HOME..." | ||
|
||
debug "sys.ip = {{sys.ip}}" | ||
debug "sys.hostname = {{sys.hostname}}" | ||
debug "pkg.origin = {{pkg.origin}}" | ||
debug "pkg.name = {{pkg.name}}" | ||
debug "pkg.version = {{pkg.version}}" | ||
debug "pkg.release = {{pkg.release}}" | ||
debug "pkg.ident = {{pkg.ident}}" | ||
debug "pkg.deps = {{pkg.deps}}" | ||
debug "pkg.exposes = {{pkg.exposes}}" | ||
debug "pkg.svc_path = {{pkg.svc_path}}" | ||
debug "pkg.svc_config_path = {{pkg.svc_config_path}}" | ||
debug "pkg.svc_data_path = {{pkg.svc_data_path}}" | ||
debug "pkg.svc_files_path = {{pkg.svc_files_path}}" | ||
debug "pkg.svc_static_path = {{pkg.svc_static_path}}" | ||
debug "pkg.svc_var_path = {{pkg.svc_var_path}}" | ||
|
||
# Move directories that ship in the package into place | ||
# Copy directories that ship in the package into place | ||
cp -a {{pkgPathFor "core/tomcat8"}}/tc {{pkg.svc_var_path}}/ | ||
|
||
# Copy our war file into the runtime tomcat directory | ||
cp {{pkg.path}}/*.war {{pkg.svc_var_path}}/tc/webapps | ||
|
||
# Following lines are to copy project tomcat configs to run time tomcat8 directory | ||
for file in $(cd {{pkg.svc_config_path}}; ls -1 *.xml) | ||
do | ||
echo "Linking $file" | ||
target="${file//_//}" | ||
ln -vsf {{pkg.svc_config_path}}/$file {{pkg.svc_var_path}}/tc/$target | ||
done | ||
|
||
echo "Done preparing TOMCAT_HOME" | ||
ln -vsf {{pkg.svc_config_path}}/server.xml {{pkg.svc_var_path}}/tc/conf/server.xml | ||
ln -vsf {{pkg.svc_config_path}}/tomcat-users.xml {{pkg.svc_var_path}}/tc/conf/tomcat-users.xml | ||
ln -vsf {{pkg.svc_config_path}}/webapps_host-manager_META-INF_context.xml {{pkg.svc_var_path}}/tc/conf/webapps_host-manager_META-INF_context.xml | ||
|
||
echo "Done preparing TOMCAT_HOME" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters