We written a shell script for sending email. But the cronjob fails and it logged the following error in logfile.txt on the server.Which is nothing but the code of /home/user/public_html/app/Console/cake. Where it wrongs?
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