| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project basedir="../" name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE" default="WPS_Functions.SYSTEM.PROCES.IS-ALIVE">
-
- <include file="build.WPS_Functions.PRODUCT.xml" optional="true"/>
-
-
- <property name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.build" location="${WPS_Functions.basedir}/build.WPS_Functions.SYSTEM.PROCES.IS-ALIVE.xml"/>
- <property name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.bash-script" location="${WPS_Functions.basedir}/WPS_Functions.SYSTEM.PROCES.IS-ALIVE.sh"/>
-
- <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive"/>
- <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process"/>
- <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.result"/>
- <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive"/>
-
-
- <target name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE" description="To if typed process is alive">
- <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process"/>
- <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.result"/>
- <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.cond"/>
- <local name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive"/>
-
- <input addproperty="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process" message="Type process Process ID to check if it is alive"/>
- <exec executable="${WPS_Functions.SYSTEM.PROCES.IS-ALIVE.bash-script}"
- outputproperty="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.result"
- />
- <condition taskname="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.cond" property="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive">
- <contains string="${WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.result}"
- substring="ALIVE" />
- </condition>
- </target>
-
- <target name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.cond" depends="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.ALIVE,WPS_Functions.SYSTEM.PROCES.IS-ALIVE.DEAD"/>
-
-
- <target name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.ALIVE" if="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive">
- <echo>Process ${WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive} is ALIVE</echo>
- </target>
-
- <target name="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.DEAD" unless="WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive">
- <echo>Process ${WPS_Functions.SYSTEM.PROCES.IS-ALIVE.tested-process.is-alive} is DEAD</echo>
- </target>
-
- </project>
|