Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:obsgeek0:repos:ALP
tomcat
tomcat-serverxml-tool.sh.in
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tomcat-serverxml-tool.sh.in of Package tomcat
#!/bin/bash JAR=@LIBEXECDIR@/tomcat/serverxmltool.jar SERVERXML=/etc/tomcat/server.xml function usage { echo "Usage: <script> file.xslt [arg=value]..." } if [[ -z "$1" ]]; then usage exit 1 fi XSLT="$1" ATTRIBUTE="${@:2}" SUFIX=$(date +%H%M%S%N) rm -f ${SERVERXML}.new${SUFIX} ${SERVERXML}.old${SUFIX} /usr/bin/java -jar $JAR $XSLT $SERVERXML $ATTRIBUTE > ${SERVERXML}.new${SUFIX} if [ $? -eq 0 ]; then mv $SERVERXML ${SERVERXML}.old${SUFIX} mv ${SERVERXML}.new${SUFIX} $SERVERXML rm ${SERVERXML}.old${SUFIX} if [[ -z "$ATTRIBUTE" ]]; then echo "Use $XSLT with no attribute" else echo "Use $XSLT with attribute $ATTRIBUTE" fi else echo "$SERVERXML was not modified." rm ${SERVERXML}.new${SUFIX} exit 2 fi
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor