Control Web Panel

WebPanel => CentOS-WebPanel Bugs => Topic started by: Wonder on October 29, 2026, 10:37:32 AM

Title: Bug in /scripts/stats_goaccess – Invalid shebang on AlmaLinux 8 and 9
Post by: Wonder on October 29, 2026, 10:37:32 AM
Hello,

I've found the same syntax error in `/scripts/stats_goaccess` on three different CWP servers:

- Two servers running AlmaLinux 8.
- One server running AlmaLinux 9.

The daily CWP cron reports:

/scripts/stats_goaccess: line 58: unexpected EOF while looking for matching ``'
/scripts/stats_goaccess: line 78: syntax error: unexpected end of file

After investigating, I found that the first line of the script contains an unexpected backtick:

`#!/bin/bash

Instead of:

#!/bin/bash

Removing the leading backtick fixes the syntax error.

I've applied the correction to all three servers and confirmed that:

bash -n /scripts/stats_goaccess

completes successfully without any errors.

Since the same issue appears on three independent installations, it seems likely that the script distributed by CWP contains this typo.

Could you please check whether the original script needs to be corrected?

Also, could a future CWP update overwrite the locally corrected file?

Thanks!
Title: Re: Bug in /scripts/stats_goaccess – Invalid shebang on AlmaLinux 8 and 9
Post by: overseer on October 29, 2026, 11:56:12 AM
Good find -- guess the devs make some typos every now & again. Also in /usr/local/cwpsrv/conf/cwpsrv.conf it looks as though someone fell asleep on their keyboard and put dozens of extra returns in the middle of the file. Still works, though -- so no harm done there.