Symptoms
After a recent cPanel update, E-Mails sent from the server contained an error that a cron job failed due to a bad syntax related to the WP Toolkit extension.
Description
The subject of the E-Mail being sent from the affected server is:
Cron <root@servername> sleep $((1 + RANDOM
The error in the E-Mail is:
/bin/sh: -c: line 0: unexpected EOF while looking for matching `)'
/bin/sh: -c: line 1: syntax error: unexpected end of file
The affected cron is /etc/cron.d/wp-toolkit-update and cron job command:
{{0 1 * * * root sleep $((1 + RANDOM % 5))h $((1 + RANDOM % 60))m; /usr/bin/yum -y update wp-toolkit-c
The WP Toolkit team has fixed the issue in WP Toolkit 5.1.0+.
Workaround
The "%" should be replaced with "\%" in /etc/cron.d/wp-toolkit-update. You can run this command to fix the file.
sed -i 's/\%/\\%/g' /etc/cron.d/wp-toolkit-update
Comments
0 comments
Article is closed for comments.