Advertisement
DD3AH

Check Apache Config

May 14th, 2024
705
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.21 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Einige Tests ob beim Apache httpd die  enabled- und available-Verzeichnisse
  4. # wie vorgesehen genutzt sind
  5. #
  6. # (c) 2024 Emil Obermayr / dd3ah.de
  7.  
  8. echo -n 'Sind alle Softlinks in einem Enabled-Verzeichnis?         '
  9. find /etc/apache2/ -type l | fgrep -v -e '-enabled' || echo ok
  10.  
  11. echo -n 'Sind alle Dateien in conf-enabled vom Typ Softlink?       '
  12. find /etc/apache2/conf-enabled/* ! -type l | grep '^' || echo ok
  13.  
  14. echo -n '... sites                                                 '
  15. find /etc/apache2/sites-enabled/* ! -type l | grep '^' || echo ok
  16.  
  17. echo -n '... mods                                                  '
  18. find /etc/apache2/mods-enabled/* ! -type l | grep '^' || echo ok
  19.  
  20. echo -n 'Zeigen alle Softlinks von mods-enabled in mods-available? '
  21. find /etc/apache2/mods-enabled/* -type l -printf '%l\n' | fgrep -v '/mods-available/'  || echo ok
  22.  
  23. echo -n '... conf                                                  '
  24. find /etc/apache2/conf-enabled/* -type l -printf '%l\n' | fgrep -v '/conf-available/' || echo ok
  25.  
  26. echo -n '... sites                                                 '
  27. find /etc/apache2/sites-enabled/* -type l -printf '%l\n' | fgrep -v '/sites-available/'  || echo ok
  28.  
Tags: Apache
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement