#!/bin/bash
if [ ! -d main-form/images ] ; then
echo "Error: Unable to find 'main-form/images'. Have you run UNZIP.sh?" >2
exit
fi
config_file="nz-flag-design.xml"
echo ""
echo "****"
echo "* 1. Making 'render-3d/images/' world-writable to ensure web server can write to it"
echo "* => chmod a+rwx render-3d/images"
echo "* => chmod a+rw render-3d/images/*.png"
echo "****"
chmod a+rwx render-3d/images/
chmod a+rw render-3d/images/*.png
echo "****"
echo "* 2. Creating Tomcat config file: $config_file"
echo "****"
echo " "$config_file"
echo " useHttpOnly=\"false\"" >> "$config_file"
echo " docBase=\""`pwd`"\"" >> "$config_file"
echo " debug=\"1\" reloadable=\"true\"" >> "$config_file"
echo " allowLinking=\"true\">" >> "$config_file"
echo " " >> "$config_file"
echo "" >> "$config_file"
#echo ""
echo "+++ ... Done"
#echo ""
echo "****"
echo "* 3. Now copy:"
echo "* $config_file"
echo "* to:"
echo "* /conf/Catalina/localhost/$config_file"
echo "****"