Skip to content

Instantly share code, notes, and snippets.

View mughilanand's full-sized avatar

Mughil Anand Nainar mughilanand

View GitHub Profile
@mughilanand
mughilanand / gist:7336587
Created November 6, 2013 14:06
Sample apache configuration for svn
<Location /svn>
DAV svn
SVNListParentPath On
SVNParentPath /var/svnproject
AuthzSVNAccessFile /var/svnproject/svn-access-file
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /var/svnproject/svn-auth-file
Require valid-user
LimitXMLRequestBody 0
@mughilanand
mughilanand / gist:6537996
Created September 12, 2013 14:07
Function to parse XML file in Shell Script
##### Helper function to parse xml ####################################################################################
function rdom () { local IFS=\> ; read -d \< E C ;}
## pass tag name as parameter
function parseFirstElement () {
while rdom; do
if [[ $E = $1 ]]; then
echo $C
return 0
@mughilanand
mughilanand / tomcat_instances_proxy.sh
Created August 16, 2013 12:28
Tomcat startup/shutdown script for instances behind proxy.
#!/bin/bash
#Tomcat Startup and Shutdown Script for Instances Behind Proxy Server
#Created By Mughil Anand Nainar
exit_usage ()
{
USAGE="Usage: $1 { start | stop | version } $2 (linux) $3 ( instance0 | instance1 )"
echo "${USAGE}"
exit 1
}
@mughilanand
mughilanand / graphite_debian.sh
Created August 16, 2013 12:26
Auto Installation Script for Graphite in Debian/Ubuntu based system
#!/bin/bash
########################################################################
# Script for auto install of graphite in Debian and Ubuntu based system
# URL : http://graphite.wikidot.com/installation
# Created By Mughil Anand Nainar
########################################################################
####################################
# GRPHITE Dependancy Installation
####################################
@mughilanand
mughilanand / tomcat_instance.sh
Last active December 17, 2015 04:59
Tomcat Startup and Shutdown script for Three Instances.
#!/bin/bash
# Tomcat Startup and Shutdown Script For Individual Instances
# Created By Mughil Anand Nainar
export JAVA_HOME="/usr/local/java/java"
export CATALINA_HOME="/usr/local/tomcat/instance1"
export JAVA_OPTS="-server -Dapp.log.environment=test -Xmx1024M -XX:PermSize=256m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+PrintGCDateStamps -Xloggc:/var/log/tomcat/gc.log -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Dsun.lang.ClassLoader.allowArraySyntax=true -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
start() {
export CATALINA_BASE="/usr/local/tomcat/$1"