-#!/bin/sh
-#
-# Version 0.2
+#!/bin/bash
#
# etcdiff (deb-etcdiff?) shows how your current /etc dir
# diverges from the debian distribution standard one.
#FILES="/etc/sysctl.conf /etc/init.d/procps /etc/passwd-"
# by command
-FILES=$(find /etc/apache2 -type f $USERMODE | grep -v '.dpkg-')
+#FILES=$(find /etc/apache2 -type f $USERMODE | grep -v '.dpkg-')
# by command, public files, limited
#USERMODE="-perm /o+r"
#FILES=$(find /etc/ $MAXDEPTH -type f $USERMODE | grep -v '.dpkg-')
# by package name
-#FILES=$(dpkg -L apache2.2-common | grep '^/etc')
+FILES=$(dpkg -L apache2-doc | grep '^/etc')
+FILES+=" "
+FILES+=$(dpkg -L apache2.2-common | grep '^/etc')
+FILES+=" "
+FILES+=$(dpkg -L libapache2-mod-php5 | grep '^/etc')
+
for file in ${FILES};
do
+
+ # skip dirs, they will be put in the list of files when using 'dpkg -L'
+ [ -d $file ] && continue
+
if [ ! -e $file ];
then
echo "ERROR, file $file does not exist."