/etc/cron.daily/custombuild: line 29: syntax error: unexpected end of file

Meiji

Verified User
Joined
Jul 2, 2019
Messages
72
Hi,

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?
 
Try:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build cron
 
Hey @smtalk,

I was going to tell you that I have done that.

I specifically remember trying that after getting the error the first time but it didn't solve the issue at that time. I am getting the error for a few days now, I was actually waiting for OLS to solve the IPv6 Listener issue before doing anything else.

But this time, out of curiosity, hoping you might have changed something, I did ./build update + ./build cron and voila! The file vanished from my system.

Did you really change something within a couple of days? Or, I was daydreaming when I performed it last time?

Just to clarify, ./build update does not require reinitiating CageFS, correct?

To my understanding, whenever PHP or Webserver is rebuilt, I will have to reinitiate and remount CageFS.
 
Hey @smtalk,

I was going to tell you that I have done that.

I specifically remember trying that after getting the error the first time but it didn't solve the issue at that time. I am getting the error for a few days now, I was actually waiting for OLS to solve the IPv6 Listener issue before doing anything else.

But this time, out of curiosity, hoping you might have changed something, I did ./build update + ./build cron and voila! The file vanished from my system.

Did you really change something within a couple of days? Or, I was daydreaming when I performed it last time?

Just to clarify, ./build update does not require reinitiating CageFS, correct?

To my understanding, whenever PHP or Webserver is rebuilt, I will have to reinitiate and remount CageFS.

I remember changing it, but it was 6-7 days ago :) Regarding CageFS - yes, but cagefs=yes needs to be set in the options.conf.
 
Back
Top