Including files in a Custom Site

(imported topic written by MrFixit)

Is there anyway to have files included in a custom site that will automatically be mirrrored to all subscribed clients. I’m looking to try and mimic the way an external site may have a script or cmd file always there without the need to download each time.

thanks,

-Gary

(imported comment written by jessewk)

You can leverage the PropagateFiles utility. The utility is not technically supported on a standalone basis, but I’m sure you could make it work. Basically you supply it with operator credentials and point it at the file you want to propagate and specify which custom site the file should go into. For an example, check out the automatic update configuration process for the CPM site.

However, as a rule, we are moving away from including client side executables in sites. We are gradually transitioning all of our content to download the utilities on demand. The primary reason for this is to keep the site gather size and disk footprint down. It’s when multiple sites utilize the same utility it only needs to be downloaded once whereas if you put it in two sites it would be downloaded twice.

To accomodate this transition, we created the ‘utility’ command to allow you to place commonly used utilities in a separate cache. That way they typically won’t need to be downloaded more than once. You can look in the action language guide for more information on the utility command. I think that’s probably the route you want to go.

Jesse

(imported comment written by khanand91)

hi jesse, where can i find the PropagateFiles utility ?

(imported comment written by jessewk)

PropagateFiles.exe sha1=b49db2f43bbfd9f46d45bdbd9084f81771766703 size=1006664 url=http://software.bigfix.com/download/bes/cpm/PropagateFiles.exe

See here for information on how we set things up for CPM:

http://support.bigfix.com/cgi-bin/kbdirect.pl?id=824

Usage:

The following must be run once to create the authorization that lets the special user write to the special custom site:

PropagateFiles.exe CreateFileOnlyCustomSiteUserAuthorization <site admin pvk> <site admin password> <dsn> <operator name> <operator password> <site name>

is a dsn that points to the BES database. If run on the BES Server, the dsn “bes_bfenterprise” should already exist.

is a user name for a BigFix user created through BESAdmin (does not have to be a master operator)

is the password for that BigFix user

is a custom site name, and must begin with FileOnlyCustomSite_

The following will propagate the contents of a directory to a file-only custom site. Any existing files in the site will be overridden by this propagation.

PropagateFiles.exe UpdateFileOnlyCustomSite<dsn> <operator name> <operator password> <operator pvk file location> <directory to propagate> <site name>

is a path to a directory (c:\CustomSite, for example) that contains the files that you want to go into the custom site. The entire contents of the custom site wiil be replaced by the contents of the directory.

is a custom site name, and must begin with FileOnlyCustomSite_

To subscribe computers to the site ‘FileOnlyCustomSite_Foo’, create an action with relevance:

((not exists custom site subscription effective date 
"CustomSite_FileOnlyCustomSite_Foo") OR (custom site subscription effective date 
"CustomSite_FileOnlyCustomSite_Foo" < universal time 
"<add current GMT time here, not relevance 'now'>"))>

and action script:

custom site subscribe CustomSite_FileOnlyCustomSite_Trend as 
"FileOnlyCustomSite_Foo" on 
"<add current GMT time here, not relevance 'now'>"

(imported comment written by jessewk)

But… Don’t use the above information! I strongly recommend you just download the files and tag them with the ‘utility’ command. The above tactic is really only useful if your script changes regularly and you want clients to continually reapply an action whenever the script changes.

Alternatively, if you are concerned about the script eventually getting pushed out of the utility cache, just put it someplace else after downloading it. Like at the same level as BESClient.exe.

Jesse