#!/bin/bash # postfcsd # # $Id: postfcsd 41 2005-03-16 19:41:35Z jhealy $ # # This is a hook script that ties into commands issued by the # FC Core Services controller, located at /usr/sbin/fcsctl. # Please see that file for an idea of the types of commands that # can be processed. # # Commands run in this script are run just AFTER fcsctl starts # the Core Services daemon on the machine. Any arguments provided to # fcsctl are passed directly to this script as well, one argument # per invocation. For example: # # /usr/sbin/fcsctl start status # # Would cause fcsctl to process the "start" argument, then call this # scrip with an arg of "start", then process "status" itself, and finally # call this script with an arg of "status". # # Finally, this script has access to any variable defined in the calling # script. Examples include: # # SERVICE_NAME # SERVICE_APP # SERVICE_FOLDER # SERVICE_PID # USERDOCS # ARG="${1}" echo "postfcsd: Executing postflight script with arg '${ARG}':" case $ARG in start) # parent confirms that PID exists for service before calling preflight echo "postfcsd: No postflight operations for action '${ARG}'; skipping" ;; stop) # parent confirms that PID has terminated before calling postflight echo "postfcsd: No postflight operations for action '${ARG}'; skipping" ;; *) echo "postfcsd: Unknown argument '${ARG}'; skipping" ;; esac