#!/bin/sh
if [ ! "$1" = "" ] ; then
CRONSCRIPT=$1
else
CRONSCRIPT=cron.php
fi
MODE=""
if [ ! "$2" = "" ] ; then
MODE=" $2"
fi
PHP_BIN=`which php`
INSTALLDIR=`echo $0 | sed 's/testeo\.sh//g'`
if [ "$INSTALLDIR" != "" -a "`expr index $CRONSCRIPT /`" != "1" ];then
if ! ps auxwww | grep "$INSTALLDIR$CRONSCRIPT$MODE" | grep -v grep 1>/dev/nul$
$PHP_BIN $INSTALLDIR$CRONSCRIPT$MODE &
fi
else
if ! ps auxwww | grep "$CRONSCRIPT$MODE" | grep -v grep | grep -v testeo.sh 1>$
$PHP_BIN $CRONSCRIPT$MODE &
fi
fi
嗨,我运行此脚本时出现以下错误:
testeo.sh:第21行:意外令牌'fi'附近的语法错误
testeo.sh:第21行:“ fi”
您能帮我解决这个问题吗?