SUSE Linux Enterprise Server 10 代理卸载任务
Microsoft.Linux.SLES.10.Agent.Uninstall.Task (Task)
Element properties:
Member Modules:
Source Code:
<Task ID="Microsoft.Linux.SLES.10.Agent.Uninstall.Task" Target="Microsoft.Linux.SLES.10.Computer" Accessibility="Internal" Enabled="true">
<Category>Maintenance</Category>
<WriteAction ID="UninstallAgent" TypeID="Unix!Microsoft.Unix.SSHCommand.UninstallAgent.WriteAction">
<Host/>
<Port/>
<UserName>$RunAs[Name="Unix!Microsoft.Unix.AgentMaintenanceAccount"]/UserName$</UserName>
<Password>$RunAs[Name="Unix!Microsoft.Unix.AgentMaintenanceAccount"]/Password$</Password>
<UninstallCommand>if [ -f /opt/microsoft/omsagent/bin/omsadmin.sh ]; then if [ "$(/opt/microsoft/omsagent/bin/omsadmin.sh -l | grep scom | wc -l)" = "1" ] && [ "$(/opt/microsoft/omsagent/bin/omsadmin.sh -l | wc -l)" = "1" ] || [ "$(/opt/microsoft/omsagent/bin/omsadmin.sh -l)" = "No Workspace" ]; then /opt/microsoft/omsagent/bin/uninstall; else /opt/microsoft/omsagent/bin/omsadmin.sh -x scom; fi; else /opt/microsoft/scx/bin/uninstall; fi</UninstallCommand>
<PackageInstance/>
<TimeoutSeconds>120</TimeoutSeconds>
</WriteAction>
</Task>