#!/bin/sh

###########################################################
#
#  preflight 
# Copyright (c) 2005 McAfee, Inc. All Rights Reserved.
#
############################################################

#
# Shutdown any currently running daemons
#

# TODO: Replace this with some sort of command (it might be better)

pid=`ps -a -U root -o "pid" -o "command" | awk -F " " '{ if ( $2 == "/usr/local/vscanx/VShieldUpdate" ) {print $1}  }'`

kill -1 ${pid} 2>/dev/null

#
# Remove uvscan so it can be updated
#

rm -rf /usr/local/vscanx/VShieldUpdate

# Handled in postflight now.
# rm -rf /Library/CFMSupport/StuffItEngineShell.cfm
# rm -rf /Library/Frameworks/StuffIt.framework

exit 0