while getopts
"d:n:a:s:h:j:"
myopt ; do
case $myopt in
d)
conffile=$OPTARG/conf/catalina.properties
instanceName=`echo $OPTARG | awk -F/ '{print $NF}'`
cp -rf /opt/oracle/tomcat/tomcatTemplate $OPTARG
;;
n)
echo "shutdown.port=$OPTARG" >> $conffile
;;
a)
echo "ajp.port=$OPTARG" >> $conffile
;;
h)
echo "http.port=$OPTARG" >> $conffile
;;
s)
echo "https.port=$OPTARG" >> $conffile
;;
j)
echo "jmx.port=$OPTARG" >> $conffile
;;
*)
usemethod
exit
;;
esac
done
case $myopt in
d)
conffile=$OPTARG/conf/catalina.properties
instanceName=`echo $OPTARG | awk -F/ '{print $NF}'`
cp -rf /opt/oracle/tomcat/tomcatTemplate $OPTARG
;;
n)
echo "shutdown.port=$OPTARG" >> $conffile
;;
a)
echo "ajp.port=$OPTARG" >> $conffile
;;
h)
echo "http.port=$OPTARG" >> $conffile
;;
s)
echo "https.port=$OPTARG" >> $conffile
;;
j)
echo "jmx.port=$OPTARG" >> $conffile
;;
*)
usemethod
exit
;;
esac
done