Re: What is the different between cron executing and shell execution?
On Sun, 30 Jan 2005, h.wulff wrote:
> if ( ! $SAV_INSTALL_PRG $SAV_INSTALL_OPTIONS 1>/dev/null )
if [ ! "$SAV_INSTALL_PRG $SAV_INSTALL_OPTIONS" 1>/dev/null ]
> then
> echo "Unable to install the new engine"
> echo "Command: \"$SAV_INSTALL_PRG $SAV_INSTALL_OPTIONS\""
> LOG2SYSLOG "ERROR: Unable to install the new engine."
> else
> cd $TMP
ya should check if cd passed
if [ $? != 0 ];
then
echo "barf on $TMP"
exit 1
fi
check for filenames
if [ -f "$TMP/$TMP_SAV_INSTALL" ];
then
whacky -rf $TMP/$TMP_SAV_INSTALL
fi
> /bin/rm -rf $TMP/$TMP_SAV_INSTALL
> /bin/rm -f $IDE_DIR/*.ide
i'd make damm sure that your $TMP variables is properly defined before
doing your "remote managing real fast"
> LOG2SYSLOG "Successfully installed new sophos antivirus engine"
> fi
>
> All variables are defined in the header of this script.
> and LOG2SYSLOG looks like this:
>
> LOG2SYSLOG()
function LOG2SYSLOG()
> {
> MY_NAME=`basename $0`
> MY_PID=`pidof -x $MY_NAME`
>
> logger -t "$MY_NAME[$MY_PID]" $1
> }
c ya
alvin
Reply to: