directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject directory-kerby git commit: Clean up the obsolte scripts
Date Sat, 21 Mar 2015 00:07:37 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master 2e1de10bc -> c8d651662


Clean up the obsolte scripts


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/c8d65166
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/c8d65166
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/c8d65166

Branch: refs/heads/master
Commit: c8d6516629d631ab2c1733f63a6a44314ed55fb2
Parents: 2e1de10
Author: Drankye <drankye@gmail.com>
Authored: Sat Mar 21 08:07:20 2015 +0800
Committer: Drankye <drankye@gmail.com>
Committed: Sat Mar 21 08:07:20 2015 +0800

----------------------------------------------------------------------
 kerby-dist/kdc-dist/scripts/ReadMe.txt          |  34 ----
 kerby-dist/kdc-dist/scripts/cluster.gv          |  22 ---
 kerby-dist/kdc-dist/scripts/commandCondition.gv | 103 ----------
 kerby-dist/kdc-dist/scripts/decryptor.gv        |  20 --
 .../kdc-dist/scripts/equinox/equinoxShutdown.gv |   5 -
 kerby-dist/kdc-dist/scripts/groovy/ReadMe.txt   |   1 -
 .../kdc-dist/scripts/groovy/helloworld.gv       |  13 --
 .../kdc-dist/scripts/linearRestartDelay.gv      |  11 --
 kerby-dist/kdc-dist/scripts/mapNetworkDrive.gv  |  12 --
 kerby-dist/kdc-dist/scripts/maxDuration.gv      |  52 ------
 kerby-dist/kdc-dist/scripts/maxStartup.gv       |  60 ------
 kerby-dist/kdc-dist/scripts/nutch/ReadMe.txt    |   5 -
 kerby-dist/kdc-dist/scripts/nutch/nutch_base.gv | 187 -------------------
 .../kdc-dist/scripts/nutch/nutch_crawl.gv       |   8 -
 .../kdc-dist/scripts/nutch/nutch_recrawl.gv     | 110 -----------
 kerby-dist/kdc-dist/scripts/nutch/nutch_solr.gv |  53 ------
 kerby-dist/kdc-dist/scripts/sendMail.gv         |  84 ---------
 kerby-dist/kdc-dist/scripts/setenv.gv           |  42 -----
 kerby-dist/kdc-dist/scripts/snmpTrap.gv         |  56 ------
 kerby-dist/kdc-dist/scripts/threadDump.gv       |  13 --
 kerby-dist/kdc-dist/scripts/timeCondition.gv    |  82 --------
 kerby-dist/kdc-dist/scripts/trayColor.gv        |  48 -----
 kerby-dist/kdc-dist/scripts/trayMessage.gv      |  29 ---
 .../kdc-dist/scripts/vfsCommandCondition.gv     |  99 ----------
 .../kdc-dist/scripts/wso2/wso2_shutdown.gv      |  13 --
 25 files changed, 1162 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/ReadMe.txt
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/ReadMe.txt b/kerby-dist/kdc-dist/scripts/ReadMe.txt
deleted file mode 100644
index a1e1a00..0000000
--- a/kerby-dist/kdc-dist/scripts/ReadMe.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-The following are scripts implementing diverse "extra" functionality for YAJSW.
-For more details please check the script file and the project documentation.
-
-
-Groovy scripts executed as trigger actions (eg if a text matches application console output,
or on state changes):
-
-sendMail.gv
-trayMessage.gv
-trayColor.gv
-snmpTrap.gv
-
-Groovy scripts executed as conditions (eg script checks condition cyclically and starts/stops
application accordingly)
-
-timeCondition.gv
-fileCondition.gv
-commandCondition.gv
-
-Groovy script executed on MSCS cluster change
-
-cluster.gv
-
-Groovy script for calculating the delay on application restart
-
-linearRestartDelay.gv
-
-Groovy script executed within the application process before the application is started (generally
to map network forlders before a service is started)
-
-mapNetworkDrive.gv
-
-Groovy script for monitoring the application
-
-maxStartup.gv
-maxDuration.gv
-

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/cluster.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/cluster.gv b/kerby-dist/kdc-dist/scripts/cluster.gv
deleted file mode 100644
index 77fad19..0000000
--- a/kerby-dist/kdc-dist/scripts/cluster.gv
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Sample for Cluster aware script 
- * 
- * Starts the process if current node is active
- * Stops the process otherwise
- * 
- * Arguments: -
- * 
- * Configuration Example:
- * 
- * wrapper.windows.cluster.script=scripts/cluster.gv
- * 
- * current cluster information may be accessed by:
- *
- * process.cluster.activeNode: returns as string the current active node for the first group
found
- * process.cluster.groupInfo: returns a Map<String, String> with <group-name, current-node-of-group>
- */
- 
-if (System.getenv("COMPUTERNAME").equals(process.cluster.activeNode))
-    process.start()
-else
-    process.stop()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/commandCondition.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/commandCondition.gv b/kerby-dist/kdc-dist/scripts/commandCondition.gv
deleted file mode 100644
index 36a387e..0000000
--- a/kerby-dist/kdc-dist/scripts/commandCondition.gv
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Condition Script for implementing the wrapper.commandfile option
- * 
- * On first call the application is started
- * With each call the script check for the existance of a command file
- * This is a text file with one command per line
- * All commands in the file are executed and the file is deleted
- * The following commands are supported:
- * 
- * START 	      : start the application if it is not running
- * STOP  	      : stop the applicaiton if it is running
- * RESTART 	    : restart the application if it is running
- * DUMP  	      : request a thread dump
- * SHUTDOWN     : stop the wrapper and the application
- * STATE <file> : writes the current state of the application to the given file
- * STARTDUMP    : start of cyclic thread dump
- * STOPDUMP     : stop of cyclic thread dump
- * 
- * Arguments: 
- * - fileName
- * 
- * Example Configuration:
- * 
- * wrapper.condition.script=scripts/commandCondition.gv 
- * wrapper.condition.script.args=cmd.txt 
- * wrapper.condition.cycle=1 
- */
-
-// on first call file is bound
-// set the file and start the process
-if (callCount == 0)
-{
-	file = new File(this.args[0])
-	process.start()
-	// at start no cyclic thread dump
-	nextDumpTime = -1
-	// uncomment to start cyclic thread dump on start
-	// nextDumpTime = System.currentTimeMillis()
-}
-
-// execute a command
-doCommand = { cmd ->
-	logger.info("executing file command "+cmd);
-	if ("START".equals(cmd))
-		process.start();
-	else if ("STOP".equals(cmd))
-		process.stop();
-	else if ("RESTART".equals(cmd))
-		process.restart();
-	else if ("DUMP".equals(cmd))
-		process.threadDump();
-	else if ("STARTDUMP".equals(cmd))
-	  	nextDumpTime = System.currentTimeMillis()
-	else if ("STOPDUMP".equals(cmd))
-	  	nextDumpTime = -1
-	else if ("SHUTDOWN".equals(cmd))
-	{
-		process.stop();
-		shutdown = true;
-	}
-	else if (cmd.startsWith("STATE "))
-	{
-		String fName = cmd.substring(6)
-		writer = new File(fName).newWriter(false) // no append
-		writer.write(process.getStringState())
-		writer.close()
-	}
-	else
-		logger.info("unknown command");
-}
-
-if (file.exists())
-// do the file
-try
-{
-	shutdown = false;
-	logger.info("command file found")
-	file.eachLine {cmd -> doCommand(cmd)}
-	file.delete();
-	logger.info("command file deleted")
-	if (shutdown)
-	{
-		Thread.sleep(5000)
-		Runtime.getRuntime().halt(0);
-	}
-}
-catch (Exception ex)
-{
-	logger.info("Error executing command file "+ex.getMessage())
-}
-
-try
-{
-if (nextDumpTime != -1 && nextDumpTime <= System.currentTimeMillis()) 
-	{ 
-		doCommand("DUMP")
-		nextDumpTime = System.currentTimeMillis()+30000 
-	}
-}
-catch (Exception ex)
-{
-	logger.info("Error executing cyclic thread dump "+ex.getMessage())
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/decryptor.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/decryptor.gv b/kerby-dist/kdc-dist/scripts/decryptor.gv
deleted file mode 100644
index cf9f058..0000000
--- a/kerby-dist/kdc-dist/scripts/decryptor.gv
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * In-Configurtion Script for encrypting configuration data
- * 
- * Dependency: http://www.jasypt.org/
- *             Download jasypt-*.jar to <yajsw>/lib/groovy/jasypt/
- * 
- * Example Configuration:
- * # definition of the In-Configuration script
- * wrapper.config.script.decryptor = scripts/decryptor.gv
- * # invocation of the script
- * wrapper.java.additional.15 = ${decryptor.invoke('decrypt'\, 'aplasdfjlk')} 
- */
-import org.jasypt.util.text.*
-
-public String decrypt(String text)
-{
-   textEncryptor = new BasicTextEncryptor();
-   textEncryptor.setPassword('asdfasdf');
-   return textEncryptor.decrypt(textEncryptor.encrypt(text));
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/equinox/equinoxShutdown.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/equinox/equinoxShutdown.gv b/kerby-dist/kdc-dist/scripts/equinox/equinoxShutdown.gv
deleted file mode 100644
index 70aae9a..0000000
--- a/kerby-dist/kdc-dist/scripts/equinox/equinoxShutdown.gv
+++ /dev/null
@@ -1,5 +0,0 @@
-import org.eclipse.core.runtime.adaptor.EclipseStarter;
-
-println 'calling EclipseStarter.shutdown'
-EclipseStarter.shutdown()
-println 'shutdown terminated'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/groovy/ReadMe.txt
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/groovy/ReadMe.txt b/kerby-dist/kdc-dist/scripts/groovy/ReadMe.txt
deleted file mode 100644
index caf5193..0000000
--- a/kerby-dist/kdc-dist/scripts/groovy/ReadMe.txt
+++ /dev/null
@@ -1 +0,0 @@
-Sample groovy script used in conf/sample/wrapper.groovy_helloworld.conf showing how groovy
scripts are wrapped
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/groovy/helloworld.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/groovy/helloworld.gv b/kerby-dist/kdc-dist/scripts/groovy/helloworld.gv
deleted file mode 100644
index 139715d..0000000
--- a/kerby-dist/kdc-dist/scripts/groovy/helloworld.gv
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Sample script to test wrapping of a groovy script
- * Just loops forever and prints to file and console
- */
-writer=new File("FileWrite.out").newWriter()
-
-while (true)
-{
-	println "hello world"
-	writer.writeLine("hello world")
-	writer.flush()
-	Thread.sleep(1000);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/linearRestartDelay.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/linearRestartDelay.gv b/kerby-dist/kdc-dist/scripts/linearRestartDelay.gv
deleted file mode 100644
index cc98475..0000000
--- a/kerby-dist/kdc-dist/scripts/linearRestartDelay.gv
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * Script which increases the delay on each restart
- * Input argument is the delay in seconds
- *
- * Configuration Example:
- * 
- * wrapper.restart.delay.script=scripts/linearRestartDelay.gv
- * wrapper.restart.delay.script.args=10
- */
-  return count*Long.parseLong(args[0])
-

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/mapNetworkDrive.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/mapNetworkDrive.gv b/kerby-dist/kdc-dist/scripts/mapNetworkDrive.gv
deleted file mode 100644
index b46a6f4..0000000
--- a/kerby-dist/kdc-dist/scripts/mapNetworkDrive.gv
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * Sample script for mapping a network before an application starts on windows
- * 
- * Arguments: -
- * 
- * Configuration Example:
- * 
- * wrapper.app.pre.script=scripts/mapNetworkDrive.gv
- *
- */
-
-'net use k: \\\\myserver\\$c'.execute().text
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/maxDuration.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/maxDuration.gv b/kerby-dist/kdc-dist/scripts/maxDuration.gv
deleted file mode 100644
index b633be9..0000000
--- a/kerby-dist/kdc-dist/scripts/maxDuration.gv
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Script for checking that an application does not run
- * longer than a max duration
- * 
- * An instance of the script is invoked on startup of the application
- * Another instance is invoked when the application returns to idle state
- * 
- * On first call a timer is set. We are using a timer implementation from the netty framework.
- * The timer is stored in the context map so that it can be retrieved when the application
terminates.
- * 
- * Arguments: 
- * - maximal duration in seconds
- * 
- * Example Configuration:
- * 
- * wrapper.script.RUN = scripts/maxDuration.gv
- * wrapper.script.RUN.args = ${1*60*60} // 1 hour
- * wrapper.script.IDLE = scripts/maxDuration.gv
- *
- */
-
-import org.jboss.netty.util.*
-import java.util.concurrent.TimeUnit
-
-
-// on first call create a timer task
-if (callCount == 0 && process.isOSProcessRunning())
-{
-	Timer timer = new HashedWheelTimer();
-	final myProcess = process;
-	TimerTask task = 
-	{ Object[] timeout ->
-			if (myProcess.isOSProcessRunning())
-			{
-				System.out.println("Script maxDuration.gv: application running too long -> stopping");
-				myProcess.stop();
-			}
-	} as TimerTask;
-		long duration = Long.parseLong(args[0])
-		Timeout timeout = timer.newTimeout(task, duration, TimeUnit.SECONDS)
-		context.put("timeout", timeout);
-		System.out.println("Script maxDuration.gv: timeout set")
-}
-else if (!process.isOSProcessRunning())
-{
-	Timeout timeout = context.remove("timeout");
-	if (timeout != null && !timeout.isExpired())
-		timeout.cancel();
-	System.out.println("Script maxDuration.gv: timeout removed")
-}
-
-

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/maxStartup.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/maxStartup.gv b/kerby-dist/kdc-dist/scripts/maxStartup.gv
deleted file mode 100644
index 338dad7..0000000
--- a/kerby-dist/kdc-dist/scripts/maxStartup.gv
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Script for checking that an application reports that it is up and running 
- * within a timeout after it is in state running.
- *
- * The application reports that it is up by logging a text to the console
- * The logged text is defined as a filter trigger.
- * 
- * An instance of the script is invoked on startup of the application
- * Another instance is invoked when the expected text has been printed to the console
- * 
- * If we have been invoked by a text match (line == null) a timer is set. We are using a
timer implementation from the netty framework.
- * The timer is stored in the context map so that it can be retrieved when the application
terminates.
- * 
- * Arguments: 
- * - maximal duration in seconds
- * 
- * Example Configuration:
- * 
- * wrapper.script.RUN = scripts/maxStartup.gv
- * wrapper.script.RUN.args = ${2*60} // 2 minutes
- * wrapper.filter.trigger.systemStarted=System started
- * wrapper.filter.script.systemStarted=scripts/maxStartup.gv
- *
- */
-
-import org.jboss.netty.util.*
-import java.util.concurrent.TimeUnit
-
-println "maxStartup.gv invoked: $line"
-
-	Timeout timeout = context.remove("timeout");
-// if a timeout has been set: remove it.
-	if (timeout != null && !timeout.isExpired())
-	{
-		timeout.cancel();
-		println "Script maxStartup.gv: timeout removed"
-		}
-
-// if we are not invoked by a trigger
-if (line == null || "".equals(line))
-{
-	Timer timer = new HashedWheelTimer();
-	final myProcess = process;
-	TimerTask task = 
-	{ Object[] tt ->
-			if (myProcess.isOSProcessRunning())
-			{
-			println "Script maxStartup.gv: took too long to startup -> restart"
-				myProcess.restart();
-			}
-	} as TimerTask;
-		long duration = Long.parseLong(args[0])
-		timeout = timer.newTimeout(task, duration, TimeUnit.SECONDS)
-		context.put("timeout", timeout);
-		println "Script maxStartup.gv: timeout set"
-}
-// else: nothing to do: timeout has already been removed
-
-
-

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/nutch/ReadMe.txt
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/nutch/ReadMe.txt b/kerby-dist/kdc-dist/scripts/nutch/ReadMe.txt
deleted file mode 100644
index 9169d5c..0000000
--- a/kerby-dist/kdc-dist/scripts/nutch/ReadMe.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Sample Scripts showing how YAJSW can be used to run a workflow of applications.
-This example implements web crawl for nutch/solr.
-For further details refer to nutch_recrawl.gv.
-
-Refer also to conf/samples/luceneNutch for the configuration files for wrapping these scripts.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/nutch/nutch_base.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/nutch/nutch_base.gv b/kerby-dist/kdc-dist/scripts/nutch/nutch_base.gv
deleted file mode 100644
index fb54709..0000000
--- a/kerby-dist/kdc-dist/scripts/nutch/nutch_base.gv
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
-*
-* Base script for running nutch
-* Sets global properties
-* Defines execNutch for executing nutch in a sub-process
-* Diverse shell functions
-*/
-
-
-import org.rzo.yajsw.groovy.*
-
-// properties
-//NUTCH_HOME = "."
-crawl_dir = "$NUTCH_HOME/crawl_dir"
-//CATALINA_HOME = "."
-depth = 5
-threads = 50
-adddays = 7
-//rank = 10000 // Comment this statement if you don't want to set topN value
-safe = true
-urls = "urls"
-
-
-//
-steps=10
-try
-{
-if (rank instanceof Integer)
-	topN="--topN $rank"
-else
-  topN=""
-}
-catch (Exception ex)
-{
-	topN = ""
-}
-
-// nutch command -> main class
-getMainClass = { COMMAND ->
-if (COMMAND.equals("crawl"))
-  return "org.apache.nutch.crawl.Crawl"
-else if (COMMAND.equals("inject"))
-   return "org.apache.nutch.crawl.Injector"
-else if (COMMAND.equals("generate"))
-   return "org.apache.nutch.crawl.Generator"
-else if (COMMAND.equals("freegen"))
-   return "org.apache.nutch.tools.FreeGenerator"
-else if (COMMAND.equals("fetch"))
-   return "org.apache.nutch.fetcher.Fetcher"
-else if (COMMAND.equals("fetch2"))
-   return "org.apache.nutch.fetcher.Fetcher2"
-else if (COMMAND.equals("parse"))
-   return "org.apache.nutch.parse.ParseSegment"
-else if (COMMAND.equals("readdb"))
-   return "org.apache.nutch.crawl.CrawlDbReader"
-else if (COMMAND.equals("convdb"))
-   return "org.apache.nutch.tools.compat.CrawlDbConverter"
-else if (COMMAND.equals("mergedb"))
-   return "org.apache.nutch.crawl.CrawlDbMerger"
-else if (COMMAND.equals("readlinkdb"))
-   return "org.apache.nutch.crawl.LinkDbReader"
-else if (COMMAND.equals("readseg"))
-   return "org.apache.nutch.segment.SegmentReader"
-else if (COMMAND.equals("segread"))
-{
-	echo "[DEPRECATED] Command 'segread' is deprecated, use 'readseg' instead."
-   return "org.apache.nutch.segment.SegmentReader"
-}
-else if (COMMAND.equals("mergesegs"))
-   return "org.apache.nutch.segment.SegmentMerger"
-else if (COMMAND.equals("updatedb"))
-   return "org.apache.nutch.crawl.CrawlDb"
-else if (COMMAND.equals("invertlinks"))
-   return "org.apache.nutch.crawl.LinkDb"
-else if (COMMAND.equals("mergelinkdb"))
-   return "org.apache.nutch.crawl.LinkDbMerger"
-else if (COMMAND.equals("index"))
-   return "org.apache.nutch.indexer.Indexer"
-else if (COMMAND.equals("solrindex"))
-   return "org.apache.nutch.indexer.solr.SolrIndexer"
-else if (COMMAND.equals("dedup"))
-   return "org.apache.nutch.indexer.DeleteDuplicates"
-else if (COMMAND.equals("solrdedup"))
-   return "org.apache.nutch.indexer.solr.SolrDeleteDuplicates"
-else if (COMMAND.equals("merge"))
-   return "org.apache.nutch.indexer.IndexMerger"
-else if (COMMAND.equals("plugin"))
-   return "org.apache.nutch.plugin.PluginRepository"
-else if (COMMAND.equals("server"))
-   return 'org.apache.nutch.searcher.DistributedSearch$Server'
-   else
-	   return null
-}
-
-// run nutch set exit code into err
-err = 0
-execNutch = { args ->
-	    println "exec nutch $args"
-		builder = new WrapperBuilder()
-		// get full path to conf file
-		builder."wrapper.config" = new File("conf/wrapper.nutch.conf").getCanonicalPath()
-		// set the java application args starting with args[1]
-		args.eachWithIndex {arg, i -> if (i>0) builder."wrapper.app.parameter.$i" = arg}
-		// working dir of nutch
-		builder."NUTCH_HOME" = NUTCH_HOME
-		// get the main class depending on the nutch command in args[0]
-		builder."wrapper.java.app.mainclass" = getMainClass(args[0])
-		process = builder.process();
-		process.start()
-		process.waitFor()
-		err = process.exitCode
-		println "nutch terminated with exit code $err"
-		return err
-		}
-
-// echo command
-echo = {println it}
-
-// tomcat service
-builder = new WrapperBuilder()
-builder."wrapper.config" = "conf/wrapper.nutch_tomcat.conf"
-builder."CATALINA_HOME" = CATALINA_HOME
-tomcat = builder.service()
-// install if not already installed
-if (!tomcat.isInstalled())
-	tomcat.install()
-
-// some sh commands implemented in groovy
-delClos = { file ->
-		println "del ${file.getCanonicalPath()} ${file.isDirectory()}"
-		if (file.isDirectory())
-		{
-			file.eachDir {delClos(it)}
-			file.eachFile {if (!it.delete()) println "error deleting $it"}
-		}
-		else
-			if (!file.delete()) println "error deleting $file"
-}
-// rm -rf
-rm_rf = { file -> 
-		println "rm -rf $file"
-		removeSelf = true
-		if (file.endsWith("*"))
-		{
-			file = file.replace( "*", "")
-			removeSelf = false
-		}
-		delClos(new File(file))
-		if (removeSelf)
-		{
-			new File(file).delete()
-		}
-}
-// mv
-mvSingle = {from, to -> println "mv $from $to"; if (!from.renameTo(new File(to, from.getName())))
println "error moving $from -> $to"}
-mv = {from , to ->
-    println "mv $from $to"
-    moveDir = false
-    if (from.endsWith( "*"))
-    {
-    	from = from.replace("*", "")
-    	moveDir = true
-    }
-    from = new File(from)
-    to = new File(to)
-	success = false
-     if (moveDir)
-			{
-        from.eachFile(){mvSingle( it, to)}
-        from.eachDir(){mvSingle (it, to)}
-			}
-			else
-				mvSingle (from, to)
-}
-
-//`ls -d crawl/segments/* | tail -1`
-lastSegment = {dir = "$it"; files = new File(dir).list(); return "$dir/${files[files.length-1]}"}
-
-// touch
-touch = {
-		file = new File(it)
-	if (file.exists())
-		file.setLastModified(System.currentTimeMillis())
-	else
-		println "touch error: file does not exist ${file.getCanonicalPath()}"
-}
-

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/nutch/nutch_crawl.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/nutch/nutch_crawl.gv b/kerby-dist/kdc-dist/scripts/nutch/nutch_crawl.gv
deleted file mode 100644
index 6d22f13..0000000
--- a/kerby-dist/kdc-dist/scripts/nutch/nutch_crawl.gv
+++ /dev/null
@@ -1,8 +0,0 @@
-// basic initializations
-evaluate(new File("scripts/nutch_base.gv"))
-
-// start the script
-// bin/nutch crawl urls -dir crawl -depth 3 -topN 50
-echo "----- crawl -----"
-execNutch (["crawl", "$urls", "-dir", "${crawl_dir}", "-depth", "$depth"])
-echo "----- done -----"

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/nutch/nutch_recrawl.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/nutch/nutch_recrawl.gv b/kerby-dist/kdc-dist/scripts/nutch/nutch_recrawl.gv
deleted file mode 100644
index 2449d6e..0000000
--- a/kerby-dist/kdc-dist/scripts/nutch/nutch_recrawl.gv
+++ /dev/null
@@ -1,110 +0,0 @@
-/*  
-Original script:
-http://www.adick.at/2008-10-15,recrawl-script-for-nutch/
-
-*/
-// basic initializations
-evaluate(new File("scripts/nutch_base.gv"))
-try
-{
-// start the script
-echo "----- Inject (Step 1 of $steps) -----"
-execNutch (["inject", "${crawl_dir}/crawldb", "urls"])
-
-echo "----- Generate, Fetch, Parse, Update (Step 2 of $steps) -----"
-for(i=0; i <depth; i++)
-{
-        echo "--- Beginning crawl at depth ${i + 1} of ${depth} ---"
-        execNutch(["generate", "$crawl_dir/crawldb", "$crawl_dir/segments", "-adddays", "$adddays"])
-        if (err != 0)
-        {
-         echo "runbot: Stopping at depth ${i +1}. No more URLs to fetch."
-          break
-        }
-         segment=lastSegment( "$crawl_dir/segments/")
-         execNutch (["fetch", "$segment", "-threads ${threads}"])
-         if (err != 0)
-         {
-         echo "runbot: fetch $segment at depth ${depth} failed. Deleting it."
-         rm_rf("$segment")
-         continue
-         }
-        echo "--- Parsing Segment $segment ---"
-        execNutch (["parse", "$segment"])
-        execNutch (["updatedb", "$crawl_dir/crawldb", "$segment"])
-}
-         
-echo "----- Stopping Tomcat (Step 3 of $steps) -----"
-tomcat.stop()
-
-echo "----- Merge Segments (Step 4 of $steps) -----"
-rm_rf("$crawl_dir/MERGEDsegments")
-execNutch (["mergesegs", "$crawl_dir/MERGEDsegments", "-dir", "$crawl_dir/segments/"])
-println "err $err"
-if (err == 0)
-{
-          if (!safe)
-            rm_rf ("$crawl_dir/segments/*")
-           else
-         {
-            new File("$crawl_dir/FETCHEDsegments").mkdir()
-            mv ("$crawl_dir/segments/*", "$crawl_dir/FETCHEDsegments")
-         }
-          mv ("$crawl_dir/MERGEDsegments/*", "$crawl_dir/segments")
-          rm_rf ("$crawl_dir/MERGEDsegments")
-      }
-else
-{
-	      println "error in merge -> abort"
-          System.exit(err)
-}
-
-echo "----- Invert Links (Step 5 of $steps) -----"
-execNutch (["invertlinks", "$crawl_dir/linkdb", "$crawl_dir/segments/*"])
-
-echo "----- Index (Step 6 of $steps) -----"
-rm_rf("$crawl_dir/NEWindexes")
-rm_rf ("$crawl_dir/OLDindexes")
-execNutch (["index", "$crawl_dir/NEWindexes", "$crawl_dir/crawldb", "$crawl_dir/linkdb",
"$crawl_dir/segments/*"])
-
-echo "----- Dedup (Step 7 of $steps) -----"
-execNutch (["dedup", "$crawl_dir/NEWindexes"])
-         
-echo "----- Merge Indexes (Step 8 of $steps) -----"
-execNutch (["merge", "$crawl_dir/MERGEDindexes", "$crawl_dir/NEWindexes"])
-// in nutch-site, hadoop.tmp.dir points to crawl/tmp
-rm_rf ("$crawl_dir/tmp/*")
-// replace indexes with indexes_merged
-file = new File("$crawl_dir/OLDindexes")
-if (!file.exists()) file.mkdir()
-mv ("$crawl_dir/index/*", "$crawl_dir/OLDindexes")
-mv ("$crawl_dir/MERGEDindexes/*", "$crawl_dir/index")
-// clean up old indexes directories
-if(!safe)
-         {
-         rm_rf ("$crawl_dir/NEWindexes")
-         rm_rf ("$crawl_dir/OLDindexes")
-         }
-         
-echo "----- Reloading index on the search site (Step 9 of $steps) -----"
- if(safe)
-         {
-        touch ("${CATALINA_HOME}/webapps/ROOT/WEB-INF/web.xml")
-        echo "Done!"
-         }
-      else
-         {
-        echo "runbot: Can not reload index in safe mode."
-        echo "runbot: Please reload it manually using the following command:"
-        echo "runbot: touch ${CATALINA_HOME}/webapps/ROOT/WEB-INF/web.xml"
-         }
-
-echo "----- Restarting Tomcat (Step 10 of $steps) -----"
-tomcat.stop()
-tomcat.start()
-echo "runbot: FINISHED: Crawl completed!"
-}
-catch (Throwable ex)
-{
-	ex.printStackTrace()
-}

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/nutch/nutch_solr.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/nutch/nutch_solr.gv b/kerby-dist/kdc-dist/scripts/nutch/nutch_solr.gv
deleted file mode 100644
index c79d076..0000000
--- a/kerby-dist/kdc-dist/scripts/nutch/nutch_solr.gv
+++ /dev/null
@@ -1,53 +0,0 @@
-/*  
-Original script:
-http://www.lucidimagination.com/blog/2009/03/09/nutch-solr/
-
-
-*/
-// basic initializations
-evaluate(new File("scripts/nutch_base.gv"))
-
-solr_url = "http://127.0.0.1:8983/solr/"
-steps = 4
-
-try
-{
-// start the script
-echo "----- Inject (Step 1 of $steps) -----"
-execNutch (["inject", "${crawl_dir}/crawldb", "urls"])
-
-echo "----- Generate, Fetch, Parse, Update (Step 2 of $steps) -----"
-for(i=0; i <depth; i++)
-{
-        echo "--- Beginning crawl at depth ${i + 1} of ${depth} ---"
-        execNutch(["generate", "$crawl_dir/crawldb", "$crawl_dir/segments", "-adddays", "$adddays"])
-        if (err != 0)
-        {
-         echo "runbot: Stopping at depth ${i +1}. No more URLs to fetch."
-          break
-        }
-         segment=lastSegment( "$crawl_dir/segments/")
-         execNutch (["fetch", "$segment", "-threads ${threads}", "-noParsing"])
-         if (err != 0)
-         {
-         echo "runbot: fetch $segment at depth ${depth} failed. Deleting it."
-         rm_rf("$segment")
-         continue
-         }
-        echo "--- Parsing Segment $segment ---"
-        execNutch (["parse", "$segment"])
-        execNutch (["updatedb", "$crawl_dir/crawldb", "$segment", "-filter", "-normalize"])
-}
-
-echo "----- Invert Links (Step 3 of $steps) -----"
-execNutch (["invertlinks", "$crawl_dir/linkdb", "$crawl_dir/segments/*"])
-
-echo "----- index all content from all segments to Solr (Step 4 of $steps) -----"
-execNutch (["solrindex", "$solr_url", "$crawl_dir/crawldb", "$crawl_dir/linkdb", "$crawl_dir/segments/*"])
-
-echo "runbot: FINISHED: Crawl completed!"
-}
-catch (Throwable ex)
-{
-	ex.printStackTrace()
-}

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/sendMail.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/sendMail.gv b/kerby-dist/kdc-dist/scripts/sendMail.gv
deleted file mode 100644
index 2c6c0ab..0000000
--- a/kerby-dist/kdc-dist/scripts/sendMail.gv
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Script for sending an email.
- * 
- * Arguments: 
- * - toMail
- * - subject
- * - message
- * 
- * Example Configuration:
- * 
- * wrapper.filter.trigger.exception.mail=Exception
- * wrapper.filter.script.exception.mail=scripts/sendMail.gv
- * wrapper.filter.script.exception.mail.args=mailto@me.com, YAJSW exception, exception found
in console output please check the log file
- */
-import javax.mail.*
-import javax.mail.internet.*
-
-port = 25
-
-mailHost='smtp.mailhost.net' // set your mail provider  
-mailFrom='me@mailhost.net'   // set your mail from
-
-mailUser=null                // set your user if you require authentication
-mailPassword=null            // set your password if you require authentication
-useSSL=false             		 // set to true to use SSL
-  
-
-if (this.args == null || this.args.length != 3)
-{
-	logger.info("error in script sendMail.gv missing arguments. check configuration")
-	return;
-}
-
-mailTo=this.args[0]
-
-subject=this.args[1]
-message=this.args[2]
-
-logger.info("sending mail to " +mailTo)
-
-try
-{
-props = new Properties()
-props.put('mail.smtp.host', mailHost)
-props.put('mail.smtp.port', port.toString())
-
-if (mailPassword != null)
-{
-	props.put('mail.smtp.user', mailUser); 
-	props.put('mail.smtp.password', mailPassword) 
-	props.put('mail.smtp.auth', 'true') 
-	mailSession = Session.getDefaultInstance(props, 
-		new javax.mail.Authenticator() 
-		{ protected PasswordAuthentication getPasswordAuthentication() 
-			{ return new PasswordAuthentication(mailUser, mailPassword); 
-			} 
-		})
-}
-else
-	mailSession = Session.getDefaultInstance(props, null)
-
-
-// Construct the message
-msg = new MimeMessage(mailSession)
-msg.from = new InternetAddress(mailFrom)
-msg.addRecipient(Message.RecipientType.TO, new InternetAddress(mailTo))
-msg.subject = subject
-msg.text = message
-
-// Send the message
-if (useSSL)
-	SMTPSSLTransport.send(msg)
-else
-	Transport.send(msg)
-
-logger.info("mail sent " +mailTo)
-}
-catch (Exception ex)
-{
-logger.throwing("sendMail.gv", "run", ex)
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/setenv.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/setenv.gv b/kerby-dist/kdc-dist/scripts/setenv.gv
deleted file mode 100644
index 51b7435..0000000
--- a/kerby-dist/kdc-dist/scripts/setenv.gv
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Script for setting an OS environment variable on Windows.
- * This can be called within the wrapped application to set environment variables
- *
- * Arguments: 
- * - none
- * 
- * Example Configuration:
- * 
- * wrapper.app.pre.script = setenv.gv
- * 
- * to define the variables and their values edit the vars map in the script
- * note: System.getenv() will not return values set by this script. This script is invoked
after the java launcher initialized the environment properties.
- */
-
-import com.sun.jna.Native;
-import com.sun.jna.win32.StdCallLibrary;
-import com.sun.jna.win32.W32APIOptions;
-
-// set the variables in the following map
-def vars = ['testvar1':'testval1', 'testvar2':'testval2']
-
-println "setting environment variables"
-
-
-public interface Kernel32 extends StdCallLibrary 
-{
-	Kernel32 INSTANCE = (Kernel32) Native.loadLibrary("kernel32", Kernel32.class, W32APIOptions.UNICODE_OPTIONS);
-
-	boolean SetEnvironmentVariable(String lpName, String lpValue);
-}
-
-vars.each
-{
-	var = it.key
-	value = it.value
-	println "setting $var = $value"
-	Kernel32.INSTANCE.SetEnvironmentVariable(var, value)
-}
-
-println "done setting environment variables"
-

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/snmpTrap.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/snmpTrap.gv b/kerby-dist/kdc-dist/scripts/snmpTrap.gv
deleted file mode 100644
index 3978168..0000000
--- a/kerby-dist/kdc-dist/scripts/snmpTrap.gv
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Script for sending SNMP traps
- * 
- * arguments:
- * - ip address of the NMS
- * - id the OID of the trap is: 1.3.6.1.2.1.1.1.id
- * - message of the trap
- * 
- * required libs:
- * - snmp4j
- * 
- * Example Configuration:
- * 
- * wrapper.filter.script = scripts/snmpTrap.gv
- * wrapper.filter.script.args = 192.168.0.1, 1, out of memory exception 
- */
-
-import java.io.IOException;
-
-import org.snmp4j.*
-import org.snmp4j.smi.*
-import org.snmp4j.transport.*
-
-if (this.args == null || this.args.length != 3)
-{
-	logger.info("error in script snmpTrap.gv missing arguments. check configuration")
-	return;
-}
-
-
-nmsIp = this.args[0];
-id = this.args[1];
-msg = this.args[2];
-
-target = new CommunityTarget();
-port = 162;
-targetAddress = GenericAddress.parse("udp:"+nmsIp+"/"+port);
-target.setAddress(targetAddress);
-target.setTimeout(5000);
-target.setRetries(1);
-target.setCommunity(new OctetString("Public"));
-transport = new DefaultUdpTransportMapping();
-snmp = new Snmp(transport);
-v = new OctetString(msg);
-oid = new OID([1, 3, 6, 1, 2, 1, 1, 1, id] as int[]);
-vb = new VariableBinding(oid, v);
-p = new PDUv1();
-p.add(vb);
-snmp.trap(p, target);
-
-logger.info("sent trap to nmsIp: "+ id + " "+msg)
-
-
-
-
-

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/threadDump.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/threadDump.gv b/kerby-dist/kdc-dist/scripts/threadDump.gv
deleted file mode 100644
index 00f2a93..0000000
--- a/kerby-dist/kdc-dist/scripts/threadDump.gv
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Script for executing a thread dump.
- * This can be set as a shutdown hook in the application 
- *
- * Arguments: 
- * - none
- * 
- * Example Configuration:
- * 
- * wrapper.app.shutdown.script = threadDump.gv
- */
-println "Thead Dump YAJSW shutdown hook"
-new org.rzo.yajsw.action.ThreadDumpImpl5().execute(null, null, System.out, null)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/timeCondition.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/timeCondition.gv b/kerby-dist/kdc-dist/scripts/timeCondition.gv
deleted file mode 100644
index 95e4a67..0000000
--- a/kerby-dist/kdc-dist/scripts/timeCondition.gv
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Condition Script to check that the application is running during an interval
- * 
- * Starts the process if it is not running
- * Stops the process outside of the interval
- * 
- * Arguments: 
- * - interval begin 
- * - interval end
- * 
- * Time format <hh>[:<mm>[:<ss>]]
- * Example: 25 -> 1:00 next day
- * Example: 3, 1 -> 3:00 -> 1:00 next day
- * 
- * Configuration Example:
- * 
- * wrapper.condition.script=scripts/timeCondition.gv
- * wrapper.condition.script.args=13,13:50
- */
-
-import org.joda.time.*
-
-if (this.args == null || this.args.length != 2)
-{
-	println "error in script timeCondition.gv missing arguments. check configuration"
-	return;
-}
-
-
-getTime = { strTime ->
-			hours = 0
-			minutes = 0
-			seconds = 0
-			try
-			{
-				times = strTime.split(":")
-				hours = Integer.parseInt(times[0])
-				minutes = Integer.parseInt(times[1])
-				seconds = Integer.parseInt(times[2])
-			}
-			catch (Exception ex){}
-			now = new DateTime();
-			result = now.withTime(0, 0, 0, 0)
-			result = result.plusHours(hours)
-			result = result.plusMinutes(minutes)
-			result = result.plusSeconds(seconds)
-			return result
-        }
-
-createInterval = { ->
-	begin = getTime(args[0])
-	end   = getTime(args[1])
-	if (end.isBefore(begin))
-	   end = end.plusDays(1)
-	interval = new Interval(begin, end);
-	return interval;
-	
-}
-
-getInterval = { ->
-// on first call intervall is not bound 
-		if (callCount == 0 || interval.isAfterNow())
-			{
-				return createInterval()
-			}
-			else
-				return interval
-}
-
-
-processState = process.getStringState()
-
-if (getInterval().containsNow() && "IDLE".equals(processState))
-{
-	println "starting process"
-	process.start();
-}
-else if (!getInterval().containsNow() && !"IDLE".equals(processState))
-{
-	println "stopping process"
-	process.stop();
-}

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/trayColor.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/trayColor.gv b/kerby-dist/kdc-dist/scripts/trayColor.gv
deleted file mode 100644
index 1a25d60..0000000
--- a/kerby-dist/kdc-dist/scripts/trayColor.gv
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Script for changing the status color on the system tray icon.
- * 
- * Arguments: 
- * - color [RED|YELLOW|GREEN|BLUE|BLACK|CYAN|GRAY|MAGENTA|ORANGE|PINK|NULL]
- * 
- * Example Configuration:
- * 
- * wrapper.filter.trigger.nok.tray=not OK
- * wrapper.filter.script.nok.tray=scripts/trayColor.gv
- * wrapper.filter.script.nok.tray.args=RED
- * wrapper.filter.trigger.ok.tray=OK
- * wrapper.filter.script.ok.tray=scripts/trayColor.gv
- * wrapper.filter.script.ok.tray.args=NULL
- */
- 
- import java.awt.Color
- 
-if (this.args == null || this.args.length != 1)
-{
-	println "error in script trayMessage.gv missing arguments. check configuration"
-	return;
-}
-
-color = null;
- if (args[0].equals('RED'))
- 		color = Color.RED
-else  if (args[0].equals('NULL'))
- 		color = null
-else if (args[0].equals('GREEN'))
- 		color = Color.GREEN
-else  if (args[0].equals('BLUE'))
- 		color = Color.BLUE
-else  if (args[0].equals('BLACK'))
- 		color = Color.BLACK
-else  if (args[0].equals('CYAN'))
- 		color = Color.CYAN
-else  if (args[0].equals('GRAY'))
- 		color = Color.GRAY
-else  if (args[0].equals('MAGENTA'))
- 		color = Color.MAGENTA
-else  if (args[0].equals('ORANGE'))
- 		color = Color.ORANGE
-else  if (args[0].equals('PINK'))
- 		color = Color.PINK
- 		
-   
- process.getTrayIcon().setUserColor(color)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/trayMessage.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/trayMessage.gv b/kerby-dist/kdc-dist/scripts/trayMessage.gv
deleted file mode 100644
index 808f4be..0000000
--- a/kerby-dist/kdc-dist/scripts/trayMessage.gv
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Script for displaying a system tray message.
- * 
- * Arguments: 
- * - toMail
- * - subject
- * - message
- * 
- * Example Configuration:
- * 
- * wrapper.filter.trigger.exception.tray=Exception
- * wrapper.filter.script.exception.tray=scripts/trayMessage.gv
- * wrapper.filter.script.exception.tray.args=Exception
- */
-
-if (this.args == null || this.args.length != 1)
-{
-	println "error in script trayMessage.gv: missing arguments. check configuration"
-	return;
-}
-
-if (process == null || process.getTrayIcon() == null)
-{
-	println "error in script trayMessage.gv: no process or process not configured for tray icon"
-	return; 
-}
-
- 
- process.getTrayIcon().error(this.args[0], "$line")
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/vfsCommandCondition.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/vfsCommandCondition.gv b/kerby-dist/kdc-dist/scripts/vfsCommandCondition.gv
deleted file mode 100644
index 248f347..0000000
--- a/kerby-dist/kdc-dist/scripts/vfsCommandCondition.gv
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Condition Script for implementing the wrapper.commandfile option
- * Command file can be any VFS supported text file.
- * This allows for remote control of a server farm.
- *
- * On first call the application is started
- * With each call the script checks for update of the command file
- * This is a text file with one command per line
- * All commands in the file are executed
- * The following commands are supported:
- * 
- * START 	: start the application if it is not running
- * STOP  	: stop the applicaiton if it is running
- * RESTART 	: restart the application if it is running
- * DUMP  	: request a thread dump
- * SHUTDOWN : stop the wrapper and the application
- * STATE <file> : writes the current state of the application to the given file on
the local hd
- * 
- * Arguments: 
- * - fileName
- * 
- * Example Configuration:
- * 
- * wrapper.condition.script=scripts/vfsCommandCondition.gv 
- * wrapper.condition.script.args=http://localhost/cmd.txt 
- * wrapper.condition.cycle=1 
- */
- 
-import org.apache.commons.vfs2.VFS
-import org.apache.commons.vfs2.FileObject;
-
-// on first call file is bound
-// set the file and start the process
-if (callCount == 0)
-{
-	process.start()
-	
-	file = VFS.getManager().resolveFile(args[0]) 
-	lastmodified = 0 
-	if (file != null && file.exists()) 
-		lastmodified = file.getContent().getLastModifiedTime() 
-
-}
-
-
-// execute a command
-doCommand = { cmd ->
-	logger.info("executing file command "+cmd);
-	if ("START".equals(cmd))
-		process.start();
-	else if ("STOP".equals(cmd))
-		process.stop();
-	else if ("RESTART".equals(cmd))
-		process.restart();
-	else if ("DUMP".equals(cmd))
-		process.threadDump();
-	else if ("SHUTDOWN".equals(cmd))
-	{
-		process.stop();
-		shutdown = true;
-	}
-	else if (cmd.startsWith("STATE "))
-	{
-		String fName = cmd.substring(6)
-		writer = new File(fName).newWriter(false) // no append
-		writer.write(process.getStringState())
-		writer.close()
-	}
-	else
-		logger.info("unknown command");
-}
-
-	VFS.getManager().getFilesCache().close()
-	file = VFS.getManager().resolveFile(args[0]) 
-	
-if (file != null && file.exists() && lastmodified < file.getContent().getLastModifiedTime())
-// do the file
-try
-{
-	lastmodified = file.getContent().getLastModifiedTime() 
-	shutdown = false;
-	logger.info("new command file found " + file)
-	instream = new BufferedReader(new InputStreamReader(file.getContent().getInputStream()))
-	for (s = instream.readLine(); s != null; s = instream.readLine())
-	  doCommand(s)
-	instream.close()
-	
-	if (shutdown)
-	{
-		Thread.sleep(5000)
-		Runtime.getRuntime().halt(0);
-	}
-}
-catch (Exception ex)
-{
-	logger.info("Error executing command file "+ex.getMessage())
-	if (instream != null)
-	  instream.close()
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/c8d65166/kerby-dist/kdc-dist/scripts/wso2/wso2_shutdown.gv
----------------------------------------------------------------------
diff --git a/kerby-dist/kdc-dist/scripts/wso2/wso2_shutdown.gv b/kerby-dist/kdc-dist/scripts/wso2/wso2_shutdown.gv
deleted file mode 100644
index 89af56a..0000000
--- a/kerby-dist/kdc-dist/scripts/wso2/wso2_shutdown.gv
+++ /dev/null
@@ -1,13 +0,0 @@
-import javax.management.*
-
-servers = MBeanServerFactory.findMBeanServer(null)
-beanName = "org.wso2.carbon:type=ServerAdmin"
-println 'executing wso2 shutdown script'
-servers.each(){
-	try{
-		new GroovyMBean(it, beanName).shutdownGracefully(); 
-		println 'shutdownGracefully invoked, waiting for wso2 shutdown'; 
-		Thread.sleep(20000); 
-		return;
-		} 
-		catch (Exception ex){ex.printStackTrace()}}


Mime
View raw message