Error message when disabling modsecparse.pl

8 posts Page 1 of 1
trisager
Junior Member
Posts: 7
Joined: 14 Oct 2012, 08:14


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!
ForumAdmin
Moderator
Posts: 1409
Joined: 01 Oct 2008, 09:24


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.
trisager
Junior Member
Posts: 7
Joined: 14 Oct 2012, 08:14


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)
ForumAdmin
Moderator
Posts: 1409
Joined: 01 Oct 2008, 09:24


Thanks. That does appear to be a bug which we'll look into.
ForumAdmin
Moderator
Posts: 1409
Joined: 01 Oct 2008, 09:24


cmc v1.11 should hopefully fix this now:
http://blog.configserver.com/
trisager
Junior Member
Posts: 7
Joined: 14 Oct 2012, 08:14


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
ForumAdmin
Moderator
Posts: 1409
Joined: 01 Oct 2008, 09:24


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.
trisager
Junior Member
Posts: 7
Joined: 14 Oct 2012, 08:14


Excellent, works great now. Thank you very much for your assistance!
Tom
8 posts Page 1 of 1