Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BE63C17E83 for ; Wed, 11 Mar 2015 21:54:38 +0000 (UTC) Received: (qmail 78889 invoked by uid 500); 11 Mar 2015 21:54:38 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 78755 invoked by uid 500); 11 Mar 2015 21:54:38 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 78532 invoked by uid 99); 11 Mar 2015 21:54:38 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Mar 2015 21:54:38 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F2EF7E18B8; Wed, 11 Mar 2015 21:54:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: drankye@apache.org To: commits@directory.apache.org Date: Wed, 11 Mar 2015 21:54:38 -0000 Message-Id: <3807434724a14279b3ccb3f002e69ba9@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/8] directory-kerberos git commit: Merged installation branch. Thanks ! Contributed by Lin Chen. http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/conf/wrapper.conf ---------------------------------------------------------------------- diff --git a/kerby-dist/conf/wrapper.conf b/kerby-dist/conf/wrapper.conf new file mode 100644 index 0000000..3171e98 --- /dev/null +++ b/kerby-dist/conf/wrapper.conf @@ -0,0 +1,308 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# WARNING - Do not modify any of the properties when an application +# using this configuration file has been installed as a service or daemon. +# Please uninstall the service before modifying this file. The +# service must then be reinstalled. + +#******************************************************************** +# Java Executable Properties +#******************************************************************** +# Java Application +#wrapper.java.command=java + +# or define conditions for YAJSW searching for a JVM +# currently only valid for windows +#wrapper.java.command.minVersion=1.5 +#wrapper.java.command.maxVersion=1.6 +#wrapper.java.command.jreOnly=true +#wrapper.java.command.jdkOnly=true +#wrapper.java.command.preferJre=true +#wrapper.java.command.preferJdk=true +#wrapper.java.command.javaw=true + +# copy java.exe to /java__nnnn.exe +#wrapper.java.customProcName= + +#******************************************************************** +# working directory +#******************************************************************** +wrapper.working.dir=/home/hazel/workspace/directory-kerberos/kerby-dist/target + +# Java Main class. +# YAJSW: default is "org.rzo.yajsw.app.WrapperJVMMain" +# DO NOT SET THIS PROPERTY UNLESS YOU HAVE YOUR OWN IMPLEMENTATION +# wrapper.java.mainclass= + +#******************************************************************** +# tmp folder +# yajsw creates temporary files named in_.. out_.. err_.. jna.. +# per default these are placed in jna.tmpdir. +# jna.tmpdir is set in setenv batch file to /tmp +#******************************************************************** +wrapper.tmp.path = ${jna_tmpdir} + + +#******************************************************************** +# Application main class or native executable +# One of the following properties MUST be defined +#******************************************************************** + +# Java Application main class +wrapper.java.app.mainclass= + +# or jar file +#wrapper.java.app.jar= + +# or groovy script file +#wrapper.groovy= + +#or a native executable +#wrapper.image= + +#******************************************************************** +# Application process cpu priority and affinity +#******************************************************************** + +# Process priority: LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH +#wrapper.priority + +# CPU affinity of the process. this is a bit-array representing the cpus +#wrapper.affinity= + + +#******************************************************************** +# Application Account +# Equivalent to Posix sudo or windows runas +# Note Posix: +# \ (note: use \\ in configuration file). +# If no group is configured default group of the user is used +#******************************************************************** +#wrapper.app.account= +#wrapper.app.password= + +#******************************************************************** +# Java/Groovy Application Properties +#******************************************************************** + +# Java Classpath (include wrapper.jar) Add class path elements as +# needed starting from 1 +# YAJSW: all libs required by YAJSW are in the manifest of the wrapper.jar -> only classpath of your application is required +#wrapper.java.classpath.1= + +# Java Library Path +# YAJSW: required dll are encapsulated in jar files -> only library path of your application required +# wrapper.java.library.path.1=../lib + +# Java Additional Parameters +#wrapper.java.additional.1= + +# Initial Java Heap Size (in MB) +# alternative for wrapper.java.additional.=-Xms +#wrapper.java.initmemory=3 + +# % of total RAM +#wrapper.java.initmemory.relative=10 + +# Maximum Java Heap Size (in MB) +# alternative for wrapper.java.additional.=-Xmx +#wrapper.java.maxmemory=64 + +# % of total RAM +#wrapper.java.maxmemory.relative=30 + +# JSW requires that main class is set as app.parameter property +# YAJSW: to specify the main class please use wrapper.java.app.mainclass= + +#******************************************************************** +# Application environment properties. +#******************************************************************** +# Adds an environment to the application +#wrapper.app.env.= + +#******************************************************************** +# Wrapper Logging Properties +#******************************************************************** +# Format of output for the console. (See docs for formats) +# wrapper.console.format=PM + +# Log Level for console output. (See docs for log levels) +wrapper.console.loglevel=INFO + +# Log file to use for wrapper output logging. +wrapper.logfile=${wrapper_home}\/log\/wrapper.log + +# Format of output for the log file. (See docs for formats) +#wrapper.logfile.format=LPTM + +# Log Level for log file output. (See docs for log levels) +#wrapper.logfile.loglevel=INFO + +# Maximum size that the log file will be allowed to grow to before +# the log is rolled. Size is specified in bytes. The default value +# of 0, disables log rolling by size. May abbreviate with the 'k' (kB) or +# 'm' (mB) suffix. For example: 10m = 10 megabytes. +# If wrapper.logfile does not contain the string ROLLNUM it will be automatically added as suffix of the file name +wrapper.logfile.maxsize=10m + +# Maximum number of rolled log files which will be allowed before old +# files are deleted. The default value of 0 implies no limit. +wrapper.logfile.maxfiles=10 + +# Controls the roll mode of the log file +# possible values: DATE, WRAPPER, JVM +# If DATE is set wrapper.logfile should contain the string YYYYMMDD +# If DATE is set and wrapper.logfile.maxsize is set the log file will be rolled by size and date +# If DATE is set and wrapper.logfile.maxfiles older files rolled by size or date are deleted +#wrapper.logfile.rollmode=DATE + +#******************************************************************** +# Application Console Properties +#******************************************************************** +# Indicate if console of the application is visible. +#wrapper.console.visible=false + +# Title to use when running as a console +wrapper.console.title=kerby-server + +#******************************************************************** +# Wrapper Windows Service and Posix Daemon Properties +#******************************************************************** +# Name of the service +wrapper.ntservice.name=kerby-server + +# Display name of the service +wrapper.ntservice.displayname=kerby-server + +# Description of the service +wrapper.ntservice.description=kerby-server + +# Service dependencies. Add dependencies as needed starting from 1 +# wrapper.ntservice.dependency.1= + +# Mode in which the service is installed. AUTO_START or DEMAND_START +# wrapper.ntservice.starttype=AUTO_START + +# Allow the service to interact with the desktop. +# wrapper.ntservice.interactive=false + +# wrapper service user. only for windows. on *nix system this is root. +# see also wrapper.app.account +#wrapper.ntservice.account= +#wrapper.ntservice.password= + +#******************************************************************** +# Wrapper Posix Daemon Properties +#******************************************************************** +# Directory in which to create and execute daemon init scripts. Default: /etc/init.d +#wrapper.daemon.dir = + +# Directory where to store the wrapper pid file. Default: /var/run +#wrapper.daemon.pid.dir = + +# Directory in which to create K... and S... links. +# Default: /rcX.d +# For Ubuntu set to /etc/rcX.d +# The following grooy script should set it correctly for most distros +wrapper.daemon.run_level_dir=${if (new File('\/etc\/rc0.d').exists()) return '\/etc\/rcX.d' else return '\/etc\/init.d\/rcX.d'} + +# Setting the runlevels and priorities for automatic startup and stop of the daemon. +# Similar syntax as the update_rc.d command +# Default: equivalent to default of update_rc.d +#wrapper.daemon.update_rc = start 20 2 3 4 . start 30 5 . stop 80 0 1 6 + +#******************************************************************** +# Wrapper System Tray Properties +#******************************************************************** +# enable system tray +wrapper.tray = true + +# TCP/IP port. If none is defined multicast discovery is used to find the port +# Set the port in case multicast is not possible. +wrapper.tray.port = 15002 + +# icon file to use, per default a console icon is used +#wrapper.tray.icon= + +#******************************************************************** +# Exit Code Properties +# Restart on non zero exit code +#******************************************************************** +wrapper.on_exit.0=SHUTDOWN +wrapper.on_exit.default=RESTART + +#******************************************************************** +# Trigger actions on console output +#******************************************************************** +# On Exception show message in system tray +wrapper.filter.trigger.0=Exception +wrapper.filter.script.0=scripts\/trayMessage.gv +wrapper.filter.script.0.args=Exception + +#******************************************************************** +# Wrapper JMX +# +# connect using for example jconsole per remote access using the url +# +# service:jmx:rmi:///jndi/rmi://localhost:1099/server +# +# eventl. change port and server name +#******************************************************************** +# Enable wrapper JMX +#wrapper.jmx = true + +# JMX RMI port. default is 1099 +#wrapper.jmx.rmi.port = + +# JMX RMI credentials +# mandatory if accessing from remote server +#wrapper.jmx.rmi.user = +#wrapper.jmx.rmi.password = + +#******************************************************************** +# Wrapper timeouts +#******************************************************************** +# Number of seconds to allow between the time that the Wrapper starts the application +# and the application logon to the wrapper. +# Default: 30 seconds +#wrapper.startup.timeout = + +# Number of seconds to allow between the time that the Wrapper asks the application to shutdown and the time +that the JVM shuts down. +# Default: 30 seconds +#wrapper.shutdown.timeout = + +# Number of seconds the wrapper waits for a ping message from the java application. +# If no heart beat is received within a timeout the wrapper assumes that the application +# is non responsive and will restart it. +# Default: 30 seconds +#wrapper.ping.timeout = + + + +#******************************************************************** +# genConfig: further Properties generated by genConfig +#******************************************************************** +placeHolderSoGenPropsComeHere= +wrapper.java.app.jar = kerby-dist-1.0-SNAPSHOT-jar-with-dependencies.jar +wrapper.java.command = java +wrapper.java.classpath.1 = . +#wrapper.java.classpath.2 = C:\\Program Files\\Java\\jdk1.8.0_25\\lib +#wrapper.java.classpath.3 = C:\\Program Files\\Java\\jdk1.8.0_25\\lib\\tools.jar + +wrapper.stop.conf=conf/wrapper.stop.conf \ No newline at end of file http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/conf/wrapper.javaws.conf ---------------------------------------------------------------------- diff --git a/kerby-dist/conf/wrapper.javaws.conf b/kerby-dist/conf/wrapper.javaws.conf new file mode 100644 index 0000000..ce6f61b --- /dev/null +++ b/kerby-dist/conf/wrapper.javaws.conf @@ -0,0 +1 @@ +wrapper.java.classpath.99=${java.home}/lib/javaws.jar \ No newline at end of file http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/conf/wrapper.stop.conf ---------------------------------------------------------------------- diff --git a/kerby-dist/conf/wrapper.stop.conf b/kerby-dist/conf/wrapper.stop.conf new file mode 100644 index 0000000..39af153 --- /dev/null +++ b/kerby-dist/conf/wrapper.stop.conf @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +wrapper.app.parameter.1=stop + +wrapper.stopper = true + +wrapper.app.parameter.1 = -stop + +include=wrapper.conf http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/ReadMe.txt ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/ReadMe.txt b/kerby-dist/lib/core/ReadMe.txt new file mode 100644 index 0000000..3878b72 --- /dev/null +++ b/kerby-dist/lib/core/ReadMe.txt @@ -0,0 +1,23 @@ +This is the minimal set of libraries required by YAJSW + +It includes the following core functionalities: + +All platforms + * runConsole + * filter triggers + * regex filter triggers + * logging + * restart on exit code + * groovy scripting + * network start + +Windows + * installService, uninstallService, startService, stopService + +It does not include the following functions: + + * installDaemon, uninstallDaemon, startDaemon, stopDaemon + * system tray icon + * timers + * services manager + * network start per webdav or http or ftp \ No newline at end of file http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/commons/commons-cli-2-SNAPSHOT.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/commons/commons-cli-2-SNAPSHOT.jar b/kerby-dist/lib/core/commons/commons-cli-2-SNAPSHOT.jar new file mode 100644 index 0000000..7819797 Binary files /dev/null and b/kerby-dist/lib/core/commons/commons-cli-2-SNAPSHOT.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/commons/commons-collections-3.2.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/commons/commons-collections-3.2.jar b/kerby-dist/lib/core/commons/commons-collections-3.2.jar new file mode 100644 index 0000000..75580be Binary files /dev/null and b/kerby-dist/lib/core/commons/commons-collections-3.2.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/commons/commons-configuration-1.8.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/commons/commons-configuration-1.8.jar b/kerby-dist/lib/core/commons/commons-configuration-1.8.jar new file mode 100644 index 0000000..ae9ae99 Binary files /dev/null and b/kerby-dist/lib/core/commons/commons-configuration-1.8.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/commons/commons-io-1.3.1.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/commons/commons-io-1.3.1.jar b/kerby-dist/lib/core/commons/commons-io-1.3.1.jar new file mode 100644 index 0000000..7affdef Binary files /dev/null and b/kerby-dist/lib/core/commons/commons-io-1.3.1.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/commons/commons-lang-2.4.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/commons/commons-lang-2.4.jar b/kerby-dist/lib/core/commons/commons-lang-2.4.jar new file mode 100644 index 0000000..532939e Binary files /dev/null and b/kerby-dist/lib/core/commons/commons-lang-2.4.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/commons/commons-logging-1.1.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/commons/commons-logging-1.1.jar b/kerby-dist/lib/core/commons/commons-logging-1.1.jar new file mode 100644 index 0000000..2ff9bbd Binary files /dev/null and b/kerby-dist/lib/core/commons/commons-logging-1.1.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/commons/commons-vfs2-2.0.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/commons/commons-vfs2-2.0.jar b/kerby-dist/lib/core/commons/commons-vfs2-2.0.jar new file mode 100644 index 0000000..5e1b0b4 Binary files /dev/null and b/kerby-dist/lib/core/commons/commons-vfs2-2.0.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/groovy/groovy-all-1.8.6.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/groovy/groovy-all-1.8.6.jar b/kerby-dist/lib/core/groovy/groovy-all-1.8.6.jar new file mode 100644 index 0000000..03c02ef Binary files /dev/null and b/kerby-dist/lib/core/groovy/groovy-all-1.8.6.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/jna/jna-3.4.1.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/jna/jna-3.4.1.jar b/kerby-dist/lib/core/jna/jna-3.4.1.jar new file mode 100644 index 0000000..8e6d0c3 Binary files /dev/null and b/kerby-dist/lib/core/jna/jna-3.4.1.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/jna/platform-3.4.1.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/jna/platform-3.4.1.jar b/kerby-dist/lib/core/jna/platform-3.4.1.jar new file mode 100644 index 0000000..8357d2e Binary files /dev/null and b/kerby-dist/lib/core/jna/platform-3.4.1.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/netty/netty-3.6.6.Final.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/netty/netty-3.6.6.Final.jar b/kerby-dist/lib/core/netty/netty-3.6.6.Final.jar new file mode 100644 index 0000000..35cb073 Binary files /dev/null and b/kerby-dist/lib/core/netty/netty-3.6.6.Final.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/regex/jrexx-1.1.1.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/regex/jrexx-1.1.1.jar b/kerby-dist/lib/core/regex/jrexx-1.1.1.jar new file mode 100644 index 0000000..5968c9a Binary files /dev/null and b/kerby-dist/lib/core/regex/jrexx-1.1.1.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/core/yajsw/ahessian.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/core/yajsw/ahessian.jar b/kerby-dist/lib/core/yajsw/ahessian.jar new file mode 100644 index 0000000..f3c4c9d Binary files /dev/null and b/kerby-dist/lib/core/yajsw/ahessian.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/ReadMe.txt ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/ReadMe.txt b/kerby-dist/lib/extended/ReadMe.txt new file mode 100644 index 0000000..078c77b --- /dev/null +++ b/kerby-dist/lib/extended/ReadMe.txt @@ -0,0 +1,25 @@ +The following libraries provide extended functionalites to YAJSW: + +Timers require: + * quartz + +Posix Installation of daemons requires: + * velocity + +System tray requires: + * abeille + * jgoodies + * yajsw + +ServiceManager requires: + * abeille + * jgoodies + * glazed lists + * hessian + +Network loading in general + * commons + +Network loading per webdav + * vfs-webdav + http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/abeille/formsrt.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/abeille/formsrt.jar b/kerby-dist/lib/extended/abeille/formsrt.jar new file mode 100644 index 0000000..cd94310 Binary files /dev/null and b/kerby-dist/lib/extended/abeille/formsrt.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/commons/commons-codec-1.3.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/commons/commons-codec-1.3.jar b/kerby-dist/lib/extended/commons/commons-codec-1.3.jar new file mode 100644 index 0000000..957b675 Binary files /dev/null and b/kerby-dist/lib/extended/commons/commons-codec-1.3.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/commons/commons-httpclient-3.0.1.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/commons/commons-httpclient-3.0.1.jar b/kerby-dist/lib/extended/commons/commons-httpclient-3.0.1.jar new file mode 100644 index 0000000..cfc777c Binary files /dev/null and b/kerby-dist/lib/extended/commons/commons-httpclient-3.0.1.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/commons/commons-net-1.4.1.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/commons/commons-net-1.4.1.jar b/kerby-dist/lib/extended/commons/commons-net-1.4.1.jar new file mode 100644 index 0000000..9666a92 Binary files /dev/null and b/kerby-dist/lib/extended/commons/commons-net-1.4.1.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/glazedlists/commons-beanutils-1.8.2.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/glazedlists/commons-beanutils-1.8.2.jar b/kerby-dist/lib/extended/glazedlists/commons-beanutils-1.8.2.jar new file mode 100644 index 0000000..6baf5ec Binary files /dev/null and b/kerby-dist/lib/extended/glazedlists/commons-beanutils-1.8.2.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/glazedlists/glazedlists-1.8.0_java15.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/glazedlists/glazedlists-1.8.0_java15.jar b/kerby-dist/lib/extended/glazedlists/glazedlists-1.8.0_java15.jar new file mode 100644 index 0000000..9da3532 Binary files /dev/null and b/kerby-dist/lib/extended/glazedlists/glazedlists-1.8.0_java15.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/jgoodies/forms-1.2.0.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/jgoodies/forms-1.2.0.jar b/kerby-dist/lib/extended/jgoodies/forms-1.2.0.jar new file mode 100644 index 0000000..83f1f60 Binary files /dev/null and b/kerby-dist/lib/extended/jgoodies/forms-1.2.0.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/quartz/quartz-1.8.0.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/quartz/quartz-1.8.0.jar b/kerby-dist/lib/extended/quartz/quartz-1.8.0.jar new file mode 100644 index 0000000..ed7d614 Binary files /dev/null and b/kerby-dist/lib/extended/quartz/quartz-1.8.0.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/velocity/velocity-1.7.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/velocity/velocity-1.7.jar b/kerby-dist/lib/extended/velocity/velocity-1.7.jar new file mode 100644 index 0000000..ae936d3 Binary files /dev/null and b/kerby-dist/lib/extended/velocity/velocity-1.7.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/vfs-webdav/jackrabbit-webdav-1.5.6.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/vfs-webdav/jackrabbit-webdav-1.5.6.jar b/kerby-dist/lib/extended/vfs-webdav/jackrabbit-webdav-1.5.6.jar new file mode 100644 index 0000000..c76530d Binary files /dev/null and b/kerby-dist/lib/extended/vfs-webdav/jackrabbit-webdav-1.5.6.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/vfs-webdav/slf4j-api-1.5.0.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/vfs-webdav/slf4j-api-1.5.0.jar b/kerby-dist/lib/extended/vfs-webdav/slf4j-api-1.5.0.jar new file mode 100644 index 0000000..f4f06f0 Binary files /dev/null and b/kerby-dist/lib/extended/vfs-webdav/slf4j-api-1.5.0.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/vfs-webdav/slf4j-jdk14-1.5.0.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/vfs-webdav/slf4j-jdk14-1.5.0.jar b/kerby-dist/lib/extended/vfs-webdav/slf4j-jdk14-1.5.0.jar new file mode 100644 index 0000000..4f96eb8 Binary files /dev/null and b/kerby-dist/lib/extended/vfs-webdav/slf4j-jdk14-1.5.0.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/vfs-webdav/xercesImpl.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/vfs-webdav/xercesImpl.jar b/kerby-dist/lib/extended/vfs-webdav/xercesImpl.jar new file mode 100644 index 0000000..8f762e1 Binary files /dev/null and b/kerby-dist/lib/extended/vfs-webdav/xercesImpl.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/yajsw/hessian4.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/yajsw/hessian4.jar b/kerby-dist/lib/extended/yajsw/hessian4.jar new file mode 100644 index 0000000..505d93b Binary files /dev/null and b/kerby-dist/lib/extended/yajsw/hessian4.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/extended/yajsw/srvmgr.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/extended/yajsw/srvmgr.jar b/kerby-dist/lib/extended/yajsw/srvmgr.jar new file mode 100644 index 0000000..766606d Binary files /dev/null and b/kerby-dist/lib/extended/yajsw/srvmgr.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/groovy/ReadMe.txt ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/groovy/ReadMe.txt b/kerby-dist/lib/groovy/ReadMe.txt new file mode 100644 index 0000000..6312064 --- /dev/null +++ b/kerby-dist/lib/groovy/ReadMe.txt @@ -0,0 +1,11 @@ +The following libraries are loaded when a groovy script is executed. +To add libraries required by groovy scripts create a folder here and add the jar files to the folder. + +sendMail.gv requires: + * mail + +sendSnmpTrap.gv requires: + * snmp + +timeCondition.gv requires: + * joda \ No newline at end of file http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/groovy/joda/joda-time-1.6.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/groovy/joda/joda-time-1.6.jar b/kerby-dist/lib/groovy/joda/joda-time-1.6.jar new file mode 100644 index 0000000..68068a4 Binary files /dev/null and b/kerby-dist/lib/groovy/joda/joda-time-1.6.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/groovy/mail/activation.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/groovy/mail/activation.jar b/kerby-dist/lib/groovy/mail/activation.jar new file mode 100644 index 0000000..29a59a9 Binary files /dev/null and b/kerby-dist/lib/groovy/mail/activation.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/groovy/mail/mail.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/groovy/mail/mail.jar b/kerby-dist/lib/groovy/mail/mail.jar new file mode 100644 index 0000000..5954377 Binary files /dev/null and b/kerby-dist/lib/groovy/mail/mail.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/lib/groovy/snmp/SNMP4J.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/lib/groovy/snmp/SNMP4J.jar b/kerby-dist/lib/groovy/snmp/SNMP4J.jar new file mode 100644 index 0000000..298299b Binary files /dev/null and b/kerby-dist/lib/groovy/snmp/SNMP4J.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/scripts/ReadMe.txt ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/ReadMe.txt b/kerby-dist/scripts/ReadMe.txt new file mode 100644 index 0000000..a1e1a00 --- /dev/null +++ b/kerby-dist/scripts/ReadMe.txt @@ -0,0 +1,34 @@ +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-kerberos/blob/4fea5c98/kerby-dist/scripts/cluster.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/cluster.gv b/kerby-dist/scripts/cluster.gv new file mode 100644 index 0000000..77fad19 --- /dev/null +++ b/kerby-dist/scripts/cluster.gv @@ -0,0 +1,22 @@ +/* + * 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 with + */ + +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-kerberos/blob/4fea5c98/kerby-dist/scripts/commandCondition.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/commandCondition.gv b/kerby-dist/scripts/commandCondition.gv new file mode 100644 index 0000000..36a387e --- /dev/null +++ b/kerby-dist/scripts/commandCondition.gv @@ -0,0 +1,103 @@ +/* + * 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 : 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-kerberos/blob/4fea5c98/kerby-dist/scripts/decryptor.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/decryptor.gv b/kerby-dist/scripts/decryptor.gv new file mode 100644 index 0000000..cf9f058 --- /dev/null +++ b/kerby-dist/scripts/decryptor.gv @@ -0,0 +1,20 @@ +/* + * In-Configurtion Script for encrypting configuration data + * + * Dependency: http://www.jasypt.org/ + * Download jasypt-*.jar to /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-kerberos/blob/4fea5c98/kerby-dist/scripts/equinox/equinoxShutdown.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/equinox/equinoxShutdown.gv b/kerby-dist/scripts/equinox/equinoxShutdown.gv new file mode 100644 index 0000000..70aae9a --- /dev/null +++ b/kerby-dist/scripts/equinox/equinoxShutdown.gv @@ -0,0 +1,5 @@ +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-kerberos/blob/4fea5c98/kerby-dist/scripts/groovy/ReadMe.txt ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/groovy/ReadMe.txt b/kerby-dist/scripts/groovy/ReadMe.txt new file mode 100644 index 0000000..caf5193 --- /dev/null +++ b/kerby-dist/scripts/groovy/ReadMe.txt @@ -0,0 +1 @@ +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-kerberos/blob/4fea5c98/kerby-dist/scripts/groovy/helloworld.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/groovy/helloworld.gv b/kerby-dist/scripts/groovy/helloworld.gv new file mode 100644 index 0000000..139715d --- /dev/null +++ b/kerby-dist/scripts/groovy/helloworld.gv @@ -0,0 +1,13 @@ +/* + * 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-kerberos/blob/4fea5c98/kerby-dist/scripts/linearRestartDelay.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/linearRestartDelay.gv b/kerby-dist/scripts/linearRestartDelay.gv new file mode 100644 index 0000000..cc98475 --- /dev/null +++ b/kerby-dist/scripts/linearRestartDelay.gv @@ -0,0 +1,11 @@ +/* + * 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-kerberos/blob/4fea5c98/kerby-dist/scripts/mapNetworkDrive.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/mapNetworkDrive.gv b/kerby-dist/scripts/mapNetworkDrive.gv new file mode 100644 index 0000000..b46a6f4 --- /dev/null +++ b/kerby-dist/scripts/mapNetworkDrive.gv @@ -0,0 +1,12 @@ +/* + * 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-kerberos/blob/4fea5c98/kerby-dist/scripts/maxDuration.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/maxDuration.gv b/kerby-dist/scripts/maxDuration.gv new file mode 100644 index 0000000..b633be9 --- /dev/null +++ b/kerby-dist/scripts/maxDuration.gv @@ -0,0 +1,52 @@ +/* + * 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-kerberos/blob/4fea5c98/kerby-dist/scripts/maxStartup.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/maxStartup.gv b/kerby-dist/scripts/maxStartup.gv new file mode 100644 index 0000000..338dad7 --- /dev/null +++ b/kerby-dist/scripts/maxStartup.gv @@ -0,0 +1,60 @@ +/* + * 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-kerberos/blob/4fea5c98/kerby-dist/scripts/nutch/ReadMe.txt ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/nutch/ReadMe.txt b/kerby-dist/scripts/nutch/ReadMe.txt new file mode 100644 index 0000000..9169d5c --- /dev/null +++ b/kerby-dist/scripts/nutch/ReadMe.txt @@ -0,0 +1,5 @@ +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-kerberos/blob/4fea5c98/kerby-dist/scripts/nutch/nutch_base.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/nutch/nutch_base.gv b/kerby-dist/scripts/nutch/nutch_base.gv new file mode 100644 index 0000000..fb54709 --- /dev/null +++ b/kerby-dist/scripts/nutch/nutch_base.gv @@ -0,0 +1,187 @@ +/* +* +* 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-kerberos/blob/4fea5c98/kerby-dist/scripts/nutch/nutch_crawl.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/nutch/nutch_crawl.gv b/kerby-dist/scripts/nutch/nutch_crawl.gv new file mode 100644 index 0000000..6d22f13 --- /dev/null +++ b/kerby-dist/scripts/nutch/nutch_crawl.gv @@ -0,0 +1,8 @@ +// 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-kerberos/blob/4fea5c98/kerby-dist/scripts/nutch/nutch_recrawl.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/nutch/nutch_recrawl.gv b/kerby-dist/scripts/nutch/nutch_recrawl.gv new file mode 100644 index 0000000..2449d6e --- /dev/null +++ b/kerby-dist/scripts/nutch/nutch_recrawl.gv @@ -0,0 +1,110 @@ +/* +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 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-kerberos/blob/4fea5c98/kerby-dist/scripts/nutch/nutch_solr.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/nutch/nutch_solr.gv b/kerby-dist/scripts/nutch/nutch_solr.gv new file mode 100644 index 0000000..c79d076 --- /dev/null +++ b/kerby-dist/scripts/nutch/nutch_solr.gv @@ -0,0 +1,53 @@ +/* +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 [:[:]] + * 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-kerberos/blob/4fea5c98/kerby-dist/scripts/trayColor.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/trayColor.gv b/kerby-dist/scripts/trayColor.gv new file mode 100644 index 0000000..1a25d60 --- /dev/null +++ b/kerby-dist/scripts/trayColor.gv @@ -0,0 +1,48 @@ +/* + * 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-kerberos/blob/4fea5c98/kerby-dist/scripts/trayMessage.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/trayMessage.gv b/kerby-dist/scripts/trayMessage.gv new file mode 100644 index 0000000..808f4be --- /dev/null +++ b/kerby-dist/scripts/trayMessage.gv @@ -0,0 +1,29 @@ +/* + * 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-kerberos/blob/4fea5c98/kerby-dist/scripts/vfsCommandCondition.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/vfsCommandCondition.gv b/kerby-dist/scripts/vfsCommandCondition.gv new file mode 100644 index 0000000..248f347 --- /dev/null +++ b/kerby-dist/scripts/vfsCommandCondition.gv @@ -0,0 +1,99 @@ +/* + * 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 : 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-kerberos/blob/4fea5c98/kerby-dist/scripts/wso2/wso2_shutdown.gv ---------------------------------------------------------------------- diff --git a/kerby-dist/scripts/wso2/wso2_shutdown.gv b/kerby-dist/scripts/wso2/wso2_shutdown.gv new file mode 100644 index 0000000..89af56a --- /dev/null +++ b/kerby-dist/scripts/wso2/wso2_shutdown.gv @@ -0,0 +1,13 @@ +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()}} http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/templates/daemon.vm ---------------------------------------------------------------------- diff --git a/kerby-dist/templates/daemon.vm b/kerby-dist/templates/daemon.vm new file mode 100644 index 0000000..50db632 --- /dev/null +++ b/kerby-dist/templates/daemon.vm @@ -0,0 +1,67 @@ +#!/bin/sh +## +## '##' is velocity comment -> use $H instead +## +#set( $H = '###' ) +$H BEGIN INIT INFO +# Provides: $w_name +# Required-Start: $start_dependencies +# Required-Stop: $stop_dependencies +# Default-Start: $w_start_levels +# Default-Stop: $w_stop_levels +# Short-Description: yajsw wrapper for $w_long_name +# Description: $w_description +$H END INIT INFO +# config: $w_conf_file +# pidfile: $w_wrapper_pid_file +# apppidfile: $w_app_pid_file +#----------------------------------------------------------------------------- +# YAJSW sh script template. Suitable for starting and stopping +# wrapped daemon on POSIX platforms. +#----------------------------------------------------------------------------- + +status() { + $w_status_cmd +} + +stopit() { + echo "Stopping $w_name ..." + $w_stop_cmd +} +startit() { + echo "Starting $w_name ..." + $w_start_cmd +} + + +case "$1" in + 'start') + startit + ;; + + 'stop') + stopit + ;; + + 'restart') + stopit + startit + ;; + + + 'force-reload') + stopit + startit + ;; + + 'status') + status + ;; + + *) + echo "Usage: $0 { start | stop | restart | status }" + exit 1 + ;; +esac + +exit $? http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/templates/launchd.plist.vm ---------------------------------------------------------------------- diff --git a/kerby-dist/templates/launchd.plist.vm b/kerby-dist/templates/launchd.plist.vm new file mode 100644 index 0000000..748c4b7 --- /dev/null +++ b/kerby-dist/templates/launchd.plist.vm @@ -0,0 +1,19 @@ + + + + + + Label + $name + ProgramArguments + + #foreach ($arg in $command) + $arg + #end + + RunAtLoad + <$autoStart/> + + http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/webapps/ReadMe.txt ---------------------------------------------------------------------- diff --git a/kerby-dist/webapps/ReadMe.txt b/kerby-dist/webapps/ReadMe.txt new file mode 100644 index 0000000..aeef8d7 --- /dev/null +++ b/kerby-dist/webapps/ReadMe.txt @@ -0,0 +1,24 @@ +NOTE: this sample is currently not maintained +It will however give you an idea how to use YAJSW for remote configuraiton + +This is a sample of how to enable YAJSW java web start booter and network loading of your application + +copy zip file to webapps/yajsw/yajsw.zip. +copy your application zip file to webapps/yajsw/. +copy your yajsw network configuration file to webapps/yajsw/wrapper.conf + +start your web server (for example tomcat) +in your browser call the url: http://mysite/yajsw/yajsw.jnlp + +A running example is available on : + +http://yajsw.sourceforge.net/yajsw/yajsw.jnlp + + +wrapper.jnlp specifies the YAJSW java web start booter +wrapper.conf is the configuration for wrapping tomcat + +NOTE: using zip over http is just an example. +given that YAJSW uses apache commons VFS your application you may use any of the supported transports +(webdav, http, https, ftp, sftp, ...) to access the application and the application configuration. + http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/webapps/yajsw/serviceManagerClient.conf ---------------------------------------------------------------------- diff --git a/kerby-dist/webapps/yajsw/serviceManagerClient.conf b/kerby-dist/webapps/yajsw/serviceManagerClient.conf new file mode 100644 index 0000000..c36f87d --- /dev/null +++ b/kerby-dist/webapps/yajsw/serviceManagerClient.conf @@ -0,0 +1,10 @@ +wrapper.cache = . +wrapper.working.dir = bat +wrapper.java.app.mainclass = org.rzo.yajsw.srvmgr.client.ClientMain + +wrapper.java.classpath.1 = ../wrapper.jar +wrapper.java.classpath.2 = ../lib/core/*/*.jar +wrapper.java.classpath.3 = ../lib/extended/*/*.jar + +wrapper.filter.trigger.0=Exception +wrapper.filter.script.0=scripts/trayMessage.gv http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/webapps/yajsw/serviceManagerClient.jnlp ---------------------------------------------------------------------- diff --git a/kerby-dist/webapps/yajsw/serviceManagerClient.jnlp b/kerby-dist/webapps/yajsw/serviceManagerClient.jnlp new file mode 100644 index 0000000..b289387 --- /dev/null +++ b/kerby-dist/webapps/yajsw/serviceManagerClient.jnlp @@ -0,0 +1,28 @@ + + + + yajsw + yajsw + yajsw + + + + + + + + http://downloads.sourceforge.net/project/yajsw/yajsw/yajsw-beta-10.3/yajsw-beta-10.3.zip + yajswWebstartDemo + -c + http://yajsw.sourceforge.net/yajsw/serviceManagerClient.conf + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/webapps/yajsw/serviceManagerServer.conf ---------------------------------------------------------------------- diff --git a/kerby-dist/webapps/yajsw/serviceManagerServer.conf b/kerby-dist/webapps/yajsw/serviceManagerServer.conf new file mode 100644 index 0000000..12d9888 --- /dev/null +++ b/kerby-dist/webapps/yajsw/serviceManagerServer.conf @@ -0,0 +1,31 @@ +wrapper.cache = . +wrapper.working.dir = . +wrapper.java.app.mainclass = org.rzo.yajsw.srvmgr.server.ServerBooter + +wrapper.java.classpath.1 = wrapper.jar + +# port on which the server is listening +wrapper.app.parameter.1 = 8899 + +# access list for client servers - optional +# allow only local host +wrapper.app.parameter.2 = +n:localhost\, -n:* + + + +wrapper.tray = true + +wrapper.filter.trigger.0=Exception +wrapper.filter.script.0=scripts/trayMessage.gv + +wrapper.on_exit.0=SHUTDOWN +wrapper.on_exit.default=RESTART + +# Name of the service +wrapper.ntservice.name = ServiceManagerServer + +# Display name of the service +wrapper.ntservice.displayname = ServiceManagerServer + +# Description of the service +wrapper.ntservice.description = ServiceManagerServer http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/webapps/yajsw/serviceManagerServer.jnlp ---------------------------------------------------------------------- diff --git a/kerby-dist/webapps/yajsw/serviceManagerServer.jnlp b/kerby-dist/webapps/yajsw/serviceManagerServer.jnlp new file mode 100644 index 0000000..8fa08d7 --- /dev/null +++ b/kerby-dist/webapps/yajsw/serviceManagerServer.jnlp @@ -0,0 +1,28 @@ + + + + yajsw + yajsw + yajsw + + + + + + + + http://downloads.sourceforge.net/project/yajsw/yajsw/yajsw-beta-10.3/yajsw-beta-10.3.zip + yajswWebstartDemo + -ity + http://yajsw.sourceforge.net/yajsw/serviceManagerServer.conf + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/webapps/yajsw/wrapper.conf ---------------------------------------------------------------------- diff --git a/kerby-dist/webapps/yajsw/wrapper.conf b/kerby-dist/webapps/yajsw/wrapper.conf new file mode 100644 index 0000000..c9975cd --- /dev/null +++ b/kerby-dist/webapps/yajsw/wrapper.conf @@ -0,0 +1,41 @@ +tomcat_version = 6.0.24 +wrapper.java.minVersion=1.5.0 + +wrapper.cache = ../tomcat-${tomcat_version} + +wrapper.base = zip:http://apache.copahost.com/tomcat/tomcat-6/v${tomcat_version}/bin/apache-tomcat-${tomcat_version}.zip!apache-tomcat-${tomcat_version} + +wrapper.java.app.mainclass = org.apache.catalina.startup.Bootstrap + +wrapper.java.classpath.1 = bin/*.jar +wrapper.java.classpath.2 = lib/*.jar + +wrapper.resource.1=conf/* +wrapper.resource.2=conf/Catalina/localhost/* +wrapper.resource.3=webapps/**/* +wrapper.resource.4=webapps/* + +wrapper.java.additional.1 = -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager +wrapper.java.additional.2 = -Djava.util.logging.config.file=conf/logging.properties +wrapper.java.additional.3 = -Djava.endorsed.dirs=endorsed +wrapper.java.additional.4 = -Dcatalina.base=. +wrapper.java.additional.5 = -Dcatalina.home=. +wrapper.java.additional.6 = -Djava.io.tmpdir=${java.io.tmpdir} + +wrapper.tray = true +wrapper.tray.icon = ${wrapper.cache}/webapps/ROOT/tomcat.gif + +wrapper.filter.trigger.0=Exception +wrapper.filter.script.0=scripts/trayMessage.gv + +wrapper.on_exit.0=SHUTDOWN +wrapper.on_exit.default=RESTART + +# Name of the service +wrapper.ntservice.name = Tomcat + +# Display name of the service +wrapper.ntservice.displayname = Tomcat + +# Description of the service +wrapper.ntservice.description = Tomcat http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/webapps/yajsw/wrapperWS.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/webapps/yajsw/wrapperWS.jar b/kerby-dist/webapps/yajsw/wrapperWS.jar new file mode 100644 index 0000000..818e8e9 Binary files /dev/null and b/kerby-dist/webapps/yajsw/wrapperWS.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/webapps/yajsw/yajsw.jnlp ---------------------------------------------------------------------- diff --git a/kerby-dist/webapps/yajsw/yajsw.jnlp b/kerby-dist/webapps/yajsw/yajsw.jnlp new file mode 100644 index 0000000..a7cbc01 --- /dev/null +++ b/kerby-dist/webapps/yajsw/yajsw.jnlp @@ -0,0 +1,28 @@ + + + + yajsw + yajsw + yajsw + + + + + + + + http://downloads.sourceforge.net/project/yajsw/yajsw/yajsw-beta-10.3/yajsw-beta-10.3.zip + yajswWebstartDemo + -ity + http://yajsw.sourceforge.net/yajsw/wrapper.conf + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/wrapper.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/wrapper.jar b/kerby-dist/wrapper.jar new file mode 100644 index 0000000..40c0f3b Binary files /dev/null and b/kerby-dist/wrapper.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/wrapperApp.jar ---------------------------------------------------------------------- diff --git a/kerby-dist/wrapperApp.jar b/kerby-dist/wrapperApp.jar new file mode 100644 index 0000000..5923751 Binary files /dev/null and b/kerby-dist/wrapperApp.jar differ http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-dist/yajsw.policy.txt ---------------------------------------------------------------------- diff --git a/kerby-dist/yajsw.policy.txt b/kerby-dist/yajsw.policy.txt new file mode 100644 index 0000000..aa5bbfb --- /dev/null +++ b/kerby-dist/yajsw.policy.txt @@ -0,0 +1,4 @@ +grant codebase "file:/${yajsw.home}${/}-" +{ +permission java.security.AllPermission; +}; http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-kerb/kerb-server/pom.xml ---------------------------------------------------------------------- diff --git a/kerby-kerb/kerb-server/pom.xml b/kerby-kerb/kerb-server/pom.xml index 102cc09..98a347b 100644 --- a/kerby-kerb/kerb-server/pom.xml +++ b/kerby-kerb/kerb-server/pom.xml @@ -12,7 +12,7 @@ See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. --> - + 4.0.0 http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/4fea5c98/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java ---------------------------------------------------------------------- diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java index a454290..c3a7b82 100644 --- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java +++ b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java @@ -78,6 +78,27 @@ public class KdcServer { started = true; } + private static KdcServer server; + + public static void main(String[] args) { + if (args.length == 0) { + //FIXME host and config should be loaded from configuration. + String serverHost = "localhost"; + short serverPort = 8087; + + server = new KdcServer(); + server.setKdcHost(serverHost); + server.setKdcTcpPort(serverPort); + server.init(); + server.start(); + System.out.println("KDC Server started."); + } else if (args[0].equals("stop")){ + System.out.println("server is null? " + (server == null)); +// server.stop();//FIXME can't get the server instance here + System.out.println("KDC Server stoped."); + } + } + public String getKdcRealm() { if (kdcRealm != null) { return kdcRealm;