Deploy RES ONE Workspace Agent for Linux
Log In or Register to download the BES file, and more.

0 Votes

Description

This task will install the RES ONE Workspace Agent to Linux Endpoints.


Property Details

ID10564
StatusProduction - Fully Tested and Ready for Production
TitleDeploy RES ONE Workspace Agent for Linux
DomainBESC
SourceRES Software
Source Release Date3/21/2016 12:00:00 AM
Is TaskTrue
Added by on 3/24/2016 5:00:50 AM
Last Modified by on 3/24/2016 5:00:50 AM
Counters 1196 Views / 3 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 0 ratings. ** Log In or Register to add your rating.

Relevance

Used in 55 fixlets and 4 analyses   * Results in a true/false
Show indented relevance
unix of operating system
Used in 18 fixlets   * Results in a true/false
Show indented relevance
not mac of operating system
Used in 23 fixlets   * Results in a true/false
Show indented relevance
not exists file "/etc/init.d/reswmad"
Used in 4 fixlets   * Results in a true/false
Show indented relevance
name of operating system as lowercase starts with "linux suse" or name of operating system as lowercase starts with "linux centos 5.11"

Actions

Action 1 (default)

Action Link Deploy  this action
Script Type BigFix Action Script
//SourceReleaseDate: 20160321-102103


begin prefetch block
if {name of operating system as lowercase starts with "linux suse"}
add prefetch item name=RESWMnixAgent.rpm sha1=f5a1ee9c813257b5fb59dffc9c50439e727f0ea8 size=938626 url=http://downloads.ressoftware.com/downloads/cdm/040116/agents/res-wm-agent-9.10.1.0-1.3280.suse.x86_64.rpm sha256=6fb4c54165e063063da6915439e42c4628ad80ce70b1f07a96b2c6c61ee5facf
elseif {name of operating system as lowercase starts with "linux centos 5.11"}
add prefetch item name=RESWMnixAgent.rpm sha1=012cdace0985cc36e21796a38f701e25ba9fe92f size=318498 url=http://downloads.ressoftware.com/downloads/cdm/040116/agents/res-wm-agent-9.10.1.0-1.3280.centos.x86_64.rpm sha256=a42ad3e48e13a09d9fce8f26824afdf017b96dd5bf4d319c45f55af48861cdf0
endif
end prefetch block

action parameter query "GUID" with description "Please enter the RES Environment ID. DO NOT INCLUDE CURLY BRACES {}(WM Console/Administration/Relay Servers/Settings)"
action parameter query "WMserver" with description "Please enter the name of your BigFix server"

// All SWD files will go into a folder in the clients __BESData folder. This folder gets cleared on every restart.
parameter "baseFolder" = "__Download/"
// Log setup
parameter "mainSWDLogFolder" = "{parent folder of client folder of current site}/__Global/SWDDeployData"
folder create "{parameter "mainSWDLogFolder"}"
parameter "logFile" = "SWD_DeploymentResults.log"

//**End Preparation Marker
parameter "logFolder" = "{parameter "mainSWDLogFolder"}"
// Run setup process
delete __createfile
delete run.sh

// Use run.sh to set working directory to package root, for setup command.
createfile until _end_
cd "{parameter "baseFolder"}"
# See comments at the beginning of this action for an explanation of the comment markers.
echo $(date) >> "{parameter "logFolder"}/{parameter "logFile"}"
echo Action ID: {id of active action} >> "{parameter "logFolder"}/{parameter "logFile"}"
# //**Begin Command Marker
echo Command: rpm -ivh "RESWMnixAgent.rpm" >> "{parameter "logFolder"}/{parameter "logFile"}"
rpm -ivh "RESWMnixAgent.rpm" >> "{parameter "logFolder"}/{parameter "logFile"}" 2>&1

SWDExitCode=$?
# //**End Command Marker

echo Return code: $SWDExitCode >> "{parameter "logFolder"}/{parameter "logFile"}"
echo >> "{parameter "logFolder"}/{parameter "logFile"}"
exit $SWDExitCode
_end_

move __createfile run.sh
// You will not be able to stop or take action on an applicable BigFix Client until your installer completes.
// So ensure no user input is required.
// If your package absolutely must interact with the user, replace 'waithidden' with 'run'.
wait bash run.sh
//**Begin Closing Marker
// Get the return code of the previous action.
parameter "returnCode" = "{exit code of action}"

wait chkconfig --add reswmad
//HASHED_STRING=$(echo -n {(parameter "RESPW" of action)} | iconv -f UTF-8 -t UTF-16LE | sha1sum -b | tr '[:lower:]' '[:upper:]' | sed -e 's/ .*{"%2F"}{"%2F"}')
delete __createfile

createfile until __end
rm /etc/res/reswmad.conf
touch /etc/res/reswmad.conf
echo RSENVGUID={(parameter "GUID" of action)} >> /etc/res/reswmad.conf
echo RSPASSWORD={(parameter "RESPW" of action)} >> /etc/res/reswmad.conf
echo RSPWHASHED=Yes >> /etc/res/reswmad.conf
echo RSLIST={preceding text of first ":" of (if ((it does not contain "127.0.0.1" and it does not contain "::1") of name of registration server) then (name of registration server) else if (exists setting "_BESRelay_PostResults_ParentRelayURL" of client and exists value of setting "_BESRelay_PostResults_ParentRelayURL" of client as string) then (preceding text of first "/" of (following text of first "//" of (value of setting "_BESRelay_PostResults_ParentRelayURL" of client))) else "BES Root Server")}:{parameter "RESRELPORT" of action} >> /etc/res/reswmad.conf
sed -i 's/LearningMode=yes/LearningMode=no/g' /etc/res/resauthd.conf
__end

move __createfile agent_config.sh
wait bash agent_config.sh
wait /etc/init.d/reswmad start
delete agent_config.sh
delete run.sh
Success Criteria

This action will be considered successful when all lines of the action script have completed successfully.


Sharing

Social Media:
Share this page on Yammer

Comments