我们编写了一个用于发送电子邮件的shell脚本。但是cronjob失败了,它在服务器上的logfile.txt中记录了以下错误。这只是/ home / user / public_html / app / Console / cake的代码。 它错在哪里?
LOGFILE.TXT
X-Powered-By: PHP/5.4.36
Content-type: text/html
# Canonicalize by following every symlink of the given name recursively
canonicalize() {
NAME="$1"
if [ -f "$NAME" ]
then
DIR=$(dirname -- "$NAME")
NAME=$(cd -P "$DIR" > /dev/null && pwd -P)/$(basename -- "$NAME")
fi
while [ -h "$NAME" ]; do
DIR=$(dirname -- "$NAME")
SYM=$(readlink "$NAME")
NAME=$(cd "$DIR" > /dev/null && cd $(dirname -- "$SYM") > /dev/null && pwd)/$(basename -- "$SYM")
done
echo "$NAME"
}
CONSOLE=$(dirname -- "$(canonicalize "$0")")
APP=`pwd`
exec php -q "$CONSOLE"/cake.php -working "$APP" "$@"
exit