How do I get bigfix to upload a script to all my AIX servers? I have saved the script on the bigfix server and need to transfer it to All AIX clients on /usr/sbin and run it. The script must be run on theAIX client servers.
I do something similar with rpm packages. The maybe tricky way is to import the script into bigfix and do some actionscripting.
- rename script to .bff , this is needed to get it imported with deployment wizard
- import it into bigfix using deploment wizard for aix fileset
- -> BigFix will create a deployment package
- add maybe some more relevane, meaning check for existing script
- in action script delete all lines who will try to install the script as package
- copy the script to the new location
- run the script, check for exit code
- delete the copy
As far as I remember BigFix is not copying and running scripts from everywhere, maybe testing in /tmp might be useful
For running a script you might use something like "wait sh /usr/sbin/yourscript.sh
Example (some lines with prefetch… will be added by deployment wizard to get the script copied)
wait rm -rf /tmp/<SCRIPT DIR>/
wait mkdir -p /tmp/<SCRIPT DIR>/
move __Download/<yourscript.bff> /tmp/<SCRIPT DIR>/yourscript.sh
continue if { exists file "/tmp/<SCRIPT DIR>/yourscript.sh" }
wait sh /tmp/<SCRIPT DIR>/yourscript.sh
parameter "Exitcode" = "{if exist exit code of action then exit code of action as string else "0"}"
if {parameter "Exitcode" != "0"}
exit 1
endif
wait rm -rf /tmp/<SCRIPT DIR>
There are two other methods which can be utilized to propagate files to endpoints within your BigFix environment.
#1 - You can create a custom fixlet leveraging the prefetch command in Action Script to pull the script through your BigFix infrastructure to your AIX endpoints and then the move command to stage it to the desired path.
#2 - Under a custom site for your AIX endpoints, leverage the “File” container to propagate the desired scripts.
Obviously there’s varying degrees of maintenance with all three implementations
Hope this helps.
Best,
@cmcannady