script to replace modsec2.conf after easyapache

jimlongo

Well-Known Member
Mar 20, 2008
242
20
68
which script hook would be best to copy my custom modsec2.conf file when easy apache runs.

Code:
#!/bin/sh
cp -f /root/config_backup/modsec2.conf /usr/local/apache/conf/modsec2.conf
should I use the script 'posteasyapache' or 'before_httpd_restart_tests' ?
 

MikeDVB

Well-Known Member
PartnerNOC
Jun 4, 2008
218
3
68
Indiana, USA
Either one of those should work just fine IMHO. It just depends on whether you want it to run before the Apache tests during EasyApache or after EasyApache is completely done.
 

jimlongo

Well-Known Member
Mar 20, 2008
242
20
68
Thanks Michael,

Been thinking . . . wouldn't posteasyapache be too late as apache has already restarted?

so I'm thinking before_ or after_httpd_restart_tests
 

MikeDVB

Well-Known Member
PartnerNOC
Jun 4, 2008
218
3
68
Indiana, USA
I know that the LiteSpeed hook to build a matching PHP uses the before_httpd_restart_tests last I looked - so it's probably not a bad place to do it.