Page 1 of 1

Error message when disabling modsecparse.pl

Posted: 05 Mar 2014, 17:31
by trisager
When I disable modsecparse I get the following error:

Disable: Command not added to /scripts/posteasyapache as it is not a shell script

This of course means that modsecparse resumes running after easyapache has been run. Is there some way to avoid this?

Thanks!

Re: Error message when disabling modsecparse.pl

Posted: 05 Mar 2014, 21:07
by ForumAdmin
It means that the first line in that file is not a bash/sh declaration. I would guess you probably have an empty file - if so, if you remove it then the script will recreate it correctly.

Re: Error message when disabling modsecparse.pl

Posted: 06 Mar 2014, 15:36
by trisager
That does not appear to be the reason - this is the current content of that file:

Code: Select all

#!/bin/bash
/usr/share/cagefs/cpanel/cagefs_posteasyapache_hook<remove>.sh   #CageFS Version 2.0. Required for suphp recompilation
As far as I can tell the above is a valid declaration?

(<remove> inserted above to get around url restrictions on this forum)

Re: Error message when disabling modsecparse.pl

Posted: 06 Mar 2014, 16:55
by ForumAdmin
Thanks. That does appear to be a bug which we'll look into.

Re: Error message when disabling modsecparse.pl

Posted: 06 Mar 2014, 17:08
by ForumAdmin
cmc v1.11 should hopefully fix this now:
http://blog.configserver.com/

Re: Error message when disabling modsecparse.pl

Posted: 06 Mar 2014, 17:23
by trisager
Wow, that was quick! There is still a small issue, after enabling and disabling the script looks like this:

Code: Select all

#!/bin/bash
/usr/share/cagefs/cpanel/cagefs_posteasyapache_hook.<remove>sh   #CageFS Version 2.0. Required for suphp recompilation
#!/bin/bash
/usr/share/cagefs/cpanel/cagefs_posteasyapache_hook.<remove>sh   #CageFS Version 2.0. Required for suphp recompilation
if [ -e '/etc/cron.hourly/modsecparse.<remove>pl' ]; then /bin/mv -f /etc/cron.hourly/modsecparse.<remove>pl /root/modsecparse.<remove>pl; fi

Re: Error message when disabling modsecparse.pl

Posted: 06 Mar 2014, 17:35
by ForumAdmin
Rats. We've released v1.12 which should stop that from happening. You will need to remove the duplicate lines from /scripts/posteasyapache manually though.

Re: Error message when disabling modsecparse.pl

Posted: 06 Mar 2014, 18:08
by trisager
Excellent, works great now. Thank you very much for your assistance!
Tom