Hi,
I am getting following notification:
Here is the /etc/cron.daily/custombuild file:
The script only has 27 lines, don't know how an error occurred in the 29 line.
Also, I have another server, which was installed a couple of months earlier the file /etc/cron.daily/custombuild does not exist on that server. The server I am getting the error from was set up a week ago.
Both servers have CloudLinux + OLS.
Can anyone help how to fix this issue?
I am getting following notification:
Code:
Subject: Anacron job 'cron.daily' on hostname.domain.com
/etc/cron.daily/custombuild:
/etc/cron.daily/custombuild: line 29: syntax error: unexpected end of file
Here is the /etc/cron.daily/custombuild file:
Code:
# cat /etc/cron.daily/custombuild
#!/bin/sh
if [ -d /usr/local/directadmin/custombuild/custom/hooks/cron_execute/pre ]; then
find /usr/local/directadmin/custombuild/custom/hooks/cron_execute/pre -type f -name *.sh | while read line; do
. "$line"
done
HOOK_ERROR_CODE=$?
if [ ${HOOK_ERROR_CODE} -ne 0 ]; then
echo "Hook exited with error code: ${HOOK_ERROR_CODE}."
fi
fi
cd /usr/local/directadmin/custombuild
./build update >/dev/null 2>&1
AVAIL_UPDATES="`./build versions_nobold | grep -c -e 'update is available.'`"
if [ "${AVAIL_UPDATES}" -gt 0 ]; then
./build versions_nobold | grep 'update is available.' | mail -s "${AVAIL_UPDATES} updates running for `hostname`" root
./build update_versions
if [ -d /usr/local/directadmin/custombuild/custom/hooks/cron_execute/post ]; then
find /usr/local/directadmin/custombuild/custom/hooks/cron_execute/post -type f -name *.sh | while read line; do
. "$line"
done
HOOK_ERROR_CODE=$?
if [ ${HOOK_ERROR_CODE} -ne 0 ]; then
echo "Hook exited with error code: ${HOOK_ERROR_CODE}."
fi
fi
exit 0;
The script only has 27 lines, don't know how an error occurred in the 29 line.
Also, I have another server, which was installed a couple of months earlier the file /etc/cron.daily/custombuild does not exist on that server. The server I am getting the error from was set up a week ago.
Both servers have CloudLinux + OLS.
Can anyone help how to fix this issue?