You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2011/12/14 14:49:52 UTC

svn commit: r1214242 - in /incubator/lcf/branches/CONNECTORS-313/framework: build.xml example-multiprocess/start-agents.bat example-multiprocess/start-agents.sh example-multiprocess/stop-agents.bat example-multiprocess/stop-agents.sh

Author: kwright
Date: Wed Dec 14 13:49:52 2011
New Revision: 1214242

URL: http://svn.apache.org/viewvc?rev=1214242&view=rev
Log:
Add scripts to help with agents process management

Added:
    incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.bat   (with props)
    incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.sh   (with props)
    incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.bat   (with props)
    incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.sh   (with props)
Modified:
    incubator/lcf/branches/CONNECTORS-313/framework/build.xml

Modified: incubator/lcf/branches/CONNECTORS-313/framework/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-313/framework/build.xml?rev=1214242&r1=1214241&r2=1214242&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-313/framework/build.xml (original)
+++ incubator/lcf/branches/CONNECTORS-313/framework/build.xml Wed Dec 14 13:49:52 2011
@@ -405,6 +405,8 @@
             <fileset dir="example-multiprocess">
                 <include name="properties.xml"/>
                 <include name="logging.ini"/>
+                <include name="*.sh"/>
+                <include name="*.bat"/>
             </fileset>
         </copy>
         <mkdir dir="dist/multiprocess-example/logs"/>
@@ -482,6 +484,8 @@
             <fileset dir="example-singleprocess">
                 <include name="properties.xml"/>
                 <include name="logging.ini"/>
+                <include name="*.sh"/>
+                <include name="*.bat"/>
             </fileset>
         </copy>
     </target>

Added: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.bat
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.bat?rev=1214242&view=auto
==============================================================================
--- incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.bat (added)
+++ incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.bat Wed Dec 14 13:49:52 2011
@@ -0,0 +1,31 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem     http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem check that JAVA_HOME is set, and that the current directory is correct
+if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome
+if not exist ".\properties.xml" goto nolcfhome
+rem set MCF_HOME
+set MCF_HOME=%CD%
+rem invoke the AgentRun command
+cmd /c "processes\script\executecommand.bat org.apache.manifoldcf.agents.AgentRun"
+goto done
+:nojavahome
+echo Environment variable JAVA_HOME is not set properly.
+goto done
+:nolcfhome
+echo Current working directory does not contain a properties.xml file.
+goto done
+:done

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.bat
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.bat
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.sh
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.sh?rev=1214242&view=auto
==============================================================================
--- incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.sh (added)
+++ incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.sh Wed Dec 14 13:49:52 2011
@@ -0,0 +1,34 @@
+#!/bin/bash -e
+
+# 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.
+
+#Make sure environment variables are properly set
+if [ -e "$JAVA_HOME"/bin/java ] ; then
+    if [ -f ./properties.xml ] ; then
+        # Set the MCF_HOME variable
+        set MCF_HOME=$PWD
+        processes/script/executecommand org.apache.manifoldcf.agents.AgentRun
+        exit $?
+        
+    else
+        echo "Working directory contains no properties.xml file." 1>&2
+        exit 1
+    fi
+    
+else
+    echo "Environment variable JAVA_HOME is not properly set." 1>&2
+    exit 1
+fi

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.sh
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/start-agents.sh
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.bat
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.bat?rev=1214242&view=auto
==============================================================================
--- incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.bat (added)
+++ incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.bat Wed Dec 14 13:49:52 2011
@@ -0,0 +1,31 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem     http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem check that JAVA_HOME is set, and that the current directory is correct
+if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome
+if not exist ".\properties.xml" goto nolcfhome
+rem set MCF_HOME
+set MCF_HOME=%CD%
+rem invoke the AgentRun command
+cmd /c "processes\script\executecommand.bat org.apache.manifoldcf.agents.AgentStop"
+goto done
+:nojavahome
+echo Environment variable JAVA_HOME is not set properly.
+goto done
+:nolcfhome
+echo Current working directory does not contain a properties.xml file.
+goto done
+:done

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.bat
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.bat
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.sh
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.sh?rev=1214242&view=auto
==============================================================================
--- incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.sh (added)
+++ incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.sh Wed Dec 14 13:49:52 2011
@@ -0,0 +1,34 @@
+#!/bin/bash -e
+
+# 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.
+
+#Make sure environment variables are properly set
+if [ -e "$JAVA_HOME"/bin/java ] ; then
+    if [ -f ./properties.xml ] ; then
+        # Set the MCF_HOME variable
+        set MCF_HOME=$PWD
+        processes/script/executecommand org.apache.manifoldcf.agents.AgentStop
+        exit $?
+        
+    else
+        echo "Working directory contains no properties.xml file." 1>&2
+        exit 1
+    fi
+    
+else
+    echo "Environment variable JAVA_HOME is not properly set." 1>&2
+    exit 1
+fi

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.sh
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/lcf/branches/CONNECTORS-313/framework/example-multiprocess/stop-agents.sh
------------------------------------------------------------------------------
    svn:keywords = Id