DD3AH icon

Check Apache Config

DD3AH | PRO | 05/14/24 01:31:11 PM UTC | 0 ⭐ | 1274 👁️ | Never ⏰ | [Apache]
Bash |

1.21 KB

|

None

|

0 👍

/

0 👎

#!/bin/bash 
 
# Einige Tests ob beim Apache httpd die  enabled- und available-Verzeichnisse 
# wie vorgesehen genutzt sind
#
# (c) 2024 Emil Obermayr / dd3ah.de 
 
echo -n 'Sind alle Softlinks in einem Enabled-Verzeichnis?         '
find /etc/apache2/ -type l | fgrep -v -e '-enabled' || echo ok 
 
echo -n 'Sind alle Dateien in conf-enabled vom Typ Softlink?       '
find /etc/apache2/conf-enabled/* ! -type l | grep '^' || echo ok
 
echo -n '... sites                                                 '
find /etc/apache2/sites-enabled/* ! -type l | grep '^' || echo ok
 
echo -n '... mods                                                  '
find /etc/apache2/mods-enabled/* ! -type l | grep '^' || echo ok
 
echo -n 'Zeigen alle Softlinks von mods-enabled in mods-available? '
find /etc/apache2/mods-enabled/* -type l -printf '%l\n' | fgrep -v '/mods-available/'  || echo ok
 
echo -n '... conf                                                  '
find /etc/apache2/conf-enabled/* -type l -printf '%l\n' | fgrep -v '/conf-available/' || echo ok
 
echo -n '... sites                                                 '
find /etc/apache2/sites-enabled/* -type l -printf '%l\n' | fgrep -v '/sites-available/'  || echo ok
 

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎