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

0 Votes

Description

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


Property Details

ID10566
StatusProduction - Fully Tested and Ready for Production
TitleDeploy RES ONE Workspace Agent for Mac
DomainBESC
SourceRES Software
Source Release Date3/21/2016 12:00:00 AM
Is TaskTrue
Added by on 3/24/2016 5:00:52 AM
Last Modified by on 3/24/2016 5:00:52 AM
Counters 1383 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 9 fixlets   * Results in a true/false
Show indented relevance
not exists file "/usr/local/bin/resauthd"
Used in 9 fixlets   * Results in a true/false
Show indented relevance
name of operating system as lowercase starts with "mac os x"
Used in 9 fixlets   * Results in a true/false
Show indented relevance
system version >= "10.8.5"
Used in 9 fixlets   * Results in a true/false
Show indented relevance
system version <= "11.10"

Actions

Action 1 (default)

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


begin prefetch block
add prefetch item name=RESWMosXAgent.pkg sha1=a1ca5d8d577708406eb63976ee35aa34f86d2a88 size=321558 url=http://downloads.ressoftware.com/downloads/cdm/040116/agents/reswmad-9.10.1.0-1.3280.pkg sha256=fc408509018ed6b95db7ae33435f3317c3f119d46cd86ce43cc6a293f9a1e617
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"
//action parameter query "RESPW" with description "Please enter the Workspace Manager Environment Password"

// 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: installer -pkg "RESWMosXAgent.pkg" -target / >> "{parameter "logFolder"}/{parameter "logFile"}"
installer -pkg "RESWMosXAgent.pkg" -target / >> "{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}"

delete __createfile

createfile until __end
rm /etc/res/reswmad.conf
rm /etc/res/reswmad.conf.example
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
launchctl load /Library/LaunchDaemons/com.ressoftware.reswmad.plist
launchctl load /Library/LaunchDaemons/com.ressoftware.resauthd.plist
__end

move __createfile agent_config.sh
wait bash agent_config.sh
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