Bug in /scripts/stats_goaccess – Invalid shebang on AlmaLinux 8 and 9

Started by Wonder, Today at 10:37:32 AM

Previous topic - Next topic

Wonder

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!

overseer

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.