You can have any VMWare Smart Assurance domain manager such as SAM or IP launch a Unix command or external script during startup by editing the ics-init.asl file that the domain server calls during startup. The following shows how this could be done for an Ionix/Smarts SAM domain server:
IMPORTANT! When modifying this file, you must use sm_edit so you make edits on a local copy of the file and leave the original intact.
Add the "INVOKE_UNIX" code to the ics-init.asl file where indicated by bold text in the following:
IMPORTANT! The myscript.sh script file must be located in your smarts/actions directory before you implement the following code.
.
.
.
{ INITIALIZE_CONFMAPS " SHUTDOWN }
{ MAINTENANCE_HANDLER " SHUTDOWN }
{ INVOKE_UNIX " SHUTDOWN }}
INVOKE_UNIX
do {
script = self->create("ACT_Script", "ACT-Script-unix") ? LOG,STOP;
script->scriptName = "myscript.sh";
script->run();}
SHUTDOWN
do {
smsystem->logWarning("ICS_ESHUTTINGDOWN", aslName);
quit();
}
.
.
.