mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Search for errors/warnings in error log and stop if found
This commit is contained in:
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -49,6 +49,14 @@ jobs:
|
|||||||
run: sudo apachectl configtest
|
run: sudo apachectl configtest
|
||||||
- name: start apache with module
|
- name: start apache with module
|
||||||
run: sudo systemctl restart apache2.service
|
run: sudo systemctl restart apache2.service
|
||||||
|
- name: Search for errors/warnings in error log
|
||||||
|
run: |
|
||||||
|
errors="$(grep -E ":(?error|warn)[]]" /var/log/apache2/error.log)"
|
||||||
|
if [ -n "${errors}" ]; then
|
||||||
|
echo "Found errors/warnings in error.log"
|
||||||
|
echo "${errors}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
- name: Show httpd error log
|
- name: Show httpd error log
|
||||||
if: always()
|
if: always()
|
||||||
run: sudo cat /var/log/apache2/error.log
|
run: sudo cat /var/log/apache2/error.log
|
||||||
|
Reference in New Issue
Block a user