Switch BES Client ActionSite Masthead (Mac OS X)
Log In or Register to download the BES file, and more.

0 Votes

Collections (part of 1 collection)

BigFix Client Settings

Versioning - This is the latest version.

1TROUBLESHOOTING: Switch ActionSite Masthead on Mac OS X10/17/2012 1:15:29 PM
2Switch BES Client ActionSite Masthead (Mac OS X)8/9/2013 2:07:13 PM
3Switch BES Client ActionSite Masthead (Mac OS X)8/9/2013 2:10:35 PM

Description

Sometimes it is necessary to switch the BES Client's action site masthead. The action site masthead serves the following functions:

  • Acts as a configuration file with parameters such as BES Server IP address, port number, locking behavior, etc.
  • Contains information necessary for the digital signature security scheme that BES uses (the masthead contains the public key information)
  • Contains the licensing information that allow BES users to operate BES with a specified number of users for a specified length of time A common use for this task is to switch BES Clients from one BES Server to another.

A common use for this task is to switch BES Clients from one BES Server to another. This task applies only to Mac OS X based computers.

Note:  This action will download the file from url http://localhost:52311/Uploads/masthead.afxm and use it as the new masthead. Please put the file at that location or use a custom action to change the download url.

Note: The actions below will remove manual BES Relay settings from the BES Client prior to switching the BES Client masthead.

Important Note: Please make sure the new action site masthead is valid and points to a working BES Server. Once the masthead is switched, the BES Client may not be able to report the final status of the action because they may be pointing to a different BES Server.  Due to the complexity of this action, please fully test this action before use in a production environment.


Property Details

ID2558
StatusProduction - Fully Tested and Ready for Production
TitleSwitch BES Client ActionSite Masthead (Mac OS X)
DomainBESC
CategoryCommon Tasks
Download Size9216
Sourcedanielheth@bigfix.me
Source ID<Unspecified>
Source SeverityLow
Source Release Date8/9/2013 12:00:00 AM
KeywordsBES masthead Client Note Mac
Is TaskTrue
Added by on 8/9/2013 2:10:35 PM
Last Modified by on 8/9/2013 2:10:35 PM
Counters 7197 Views / 84 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 220 fixlets   * Results in a true/false
Show indented relevance
(if exists property "in proxy agent context" then ( not in proxy agent context ) else true )
Used in 13 fixlets   * Results in a true/false
Show indented relevance
(if (version of client >= "8.0") then (mac of it) else (name of it starts with "Mac OS X")) of operating system
Used in 23 fixlets   * Results in a true/false
Show indented relevance
version of client >= "7.2"
Used in 4 fixlets   * Results in a true/false
Show indented relevance
version of operating system >= "10.2"
Used in 3 fixlets   * Results in a true/false
Show indented relevance
if (version of client >= "8.2.1310") then (exists folder "/Library/Application Support/BigFix/BES Agent/") else ((exists folder "/Library/BESAgent/BESAgent.app/") OR (exists folder "/Library/StartupItems/BESAgent/BESAgent.app/"))

Actions

Action 1

Action Link Click here to switch actionsite masthead.
Script Type BigFix Action Script
setting "__RelayServer1"="" on "{parameter "action issue date" of action}"  for client
setting "__RelayServer2"="" on "{parameter "action issue date" of action}" for client
setting "_BESClient_RelaySelect_FailoverRelay"="" on "{parameter "action issue date" of action}" for client
setting "_BESClient_Register_Affiliation_SeekList"="" on "{parameter "action issue date" of action}" for client
setting "_BESClient_RelaySelect_TertiaryRelayList"="" on "{parameter "action issue date" of action}" for client
download http://lab.bigfix.me:52311/masthead/masthead.afxm
//continue if {(size of it = 8213 and sha1 of it = "267c5ca821c50e302ce5b6fb9dccaf3b8572169a") of file "masthead.afxm" of folder "__Download"}
if {version of client >= "8.2.1310.0"}
delete "/Library/Application Support/BigFix/BES Agent/actionsite.afxm_old"
move "/Library/Application Support/BigFix/BES Agent/actionsite.afxm" "/Library/Application Support/BigFix/BES Agent/actionsite.afxm_old"
move __Download/masthead.afxm "/Library/Application Support/BigFix/BES Agent/actionsite.afxm"
else
delete /Library/StartupItems/BESAgent/BESAgent.app/Contents/MacOS/actionsite.afxm_old
delete /Library/BESAgent/BESAgent.app/Contents/MacOS/actionsite.afxm_old
delete /Library/StartupItems/BESAgent/BESAgent.app/Contents/MacOS/ActionSite.afxm_old
delete /Library/BESAgent/BESAgent.app/Contents/MacOS/ActionSite.afxm_old
if {exists file ("/Library/StartupItems/BESAgent/BESAgent.app/Contents/MacOS/actionsite.afxm")}
move /Library/StartupItems/BESAgent/BESAgent.app/Contents/MacOS/actionsite.afxm /Library/StartupItems/BESAgent/BESAgent.app/Contents/MacOS/actionsite.afxm_old
move __Download/masthead.afxm /Library/StartupItems/BESAgent/BESAgent.app/Contents/MacOS/actionsite.afxm
elseif {exists file ("/Library/BESAgent/BESAgent.app/Contents/MacOS/actionsite.afxm")}
move /Library/BESAgent/BESAgent.app/Contents/MacOS/actionsite.afxm /Library/BESAgent/BESAgent.app/Contents/MacOS/actionsite.afxm_old
move __Download/masthead.afxm /Library/BESAgent/BESAgent.app/Contents/MacOS/actionsite.afxm
elseif {exists file ("/Library/StartupItems/BESAgent/BESAgent.app/Contents/MacOS/ActionSite.afxm")}
move /Library/StartupItems/BESAgent/BESAgent.app/Contents/MacOS/ActionSite.afxm /Library/StartupItems/BESAgent/BESAgent.app/Contents/MacOS/ActionSite.afxm_old
move __Download/masthead.afxm /Library/StartupItems/BESAgent/BESAgent.app/Contents/MacOS/ActionSite.afxm
else
move /Library/BESAgent/BESAgent.app/Contents/MacOS/ActionSite.afxm /Library/BESAgent/BESAgent.app/Contents/MacOS/ActionSite.afxm_old
move __Download/masthead.afxm /Library/BESAgent/BESAgent.app/Contents/MacOS/ActionSite.afxm
endif
endif
delete "{(client folder of current site as string) & "/__appendfile"}"
appendfile #!/bin/sh
appendfile sleep 5
if {((version of client > "7.1") AND (exists file "/Library/LaunchDaemons/BESAgentDaemon.plist") AND (system version >= "10.4"))}
    appendfile /bin/launchctl unload /Library/LaunchDaemons/BESAgentDaemon.plist
    appendfile sleep 5
    appendfile /bin/launchctl load /Library/LaunchDaemons/BESAgentDaemon.plist
else
    appendfile /sbin/SystemStarter stop BESAgent
    appendfile sleep 5
    appendfile /sbin/SystemStarter start BESAgent
endif
wait chmod 555 "{(client folder of current site as string) & "/__appendfile"}"
run {"/bin/sh -c %22trap '' 15;'" & (client folder of current site as string) & "/__appendfile'%22"}
Success Criteria

This action will be considered successful when the applicability relevance evaluates to false.


Sharing

Social Media:
Share this page on Yammer

Comments

Log In or Register to leave comments!