Execute Script Write Action (UNIX/Linux/Shebang override)

NiCE.Library.X.Execute.Script.Shebang.Override.WA (WriteActionModuleType)

Write Action to run a Script on UNIX/Linux Computer

Element properties:

TypeWriteActionModuleType
IsolationAny
AccessibilityPublic
RunAsDefault
InputTypeSystem.BaseData
OutputTypeSystem.BaseData

Member Modules:

ID Module Type TypeId RunAs 
InvokeWA WriteAction Microsoft.Unix.WSMan.Invoke.WriteAction Default

Source Code:

<WriteActionModuleType ID="NiCE.Library.X.Execute.Script.Shebang.Override.WA" Accessibility="Public" Batching="false">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="TargetSystem" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="ProductName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="NiCEBinDirectory" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="FileName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="Script" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="Arguments" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="Shebang" type="xsd:string"/>
</Configuration>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<WriteAction ID="InvokeWA" TypeID="Unix!Microsoft.Unix.WSMan.Invoke.WriteAction">
<TargetSystem>$Config/TargetSystem$</TargetSystem>
<Uri>http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem?__cimnamespace=root/scx</Uri>
<Selector/>
<InvokeAction>ExecuteScript</InvokeAction>
<Input>
&lt;p:ExecuteScript_INPUT xmlns:p="http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem"&gt;
&lt;p:script&gt;#!$Config/Shebang$
$Config/Script$&lt;/p:script&gt;
&lt;p:arguments&gt;$Config/Arguments$&lt;/p:arguments&gt;
&lt;p:timeout&gt;1800&lt;/p:timeout&gt;
&lt;/p:ExecuteScript_INPUT&gt;
</Input>
</WriteAction>
</MemberModules>
<Composition>
<Node ID="InvokeWA"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.BaseData</OutputType>
<InputType>System!System.BaseData</InputType>
</WriteActionModuleType>