Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Ignore whitespace Rev 858 → Rev 859

//scripts/alcasar-file-clean.sh
0,0 → 1,32
#/bin/bash
 
# alcasar-nf.sh
# by Rexy
# This script is distributed under the Gnu General Public License (GPL)
 
# clean alcasar conf files (remove empty lines, sort and control)
# nettoie les fichiers de conf d'alcasar (suppression des lignes vides, tri et contrĂ´le)
 
SED="/bin/sed -i"
DIR_CONF="/usr/local/etc"
ALCASAR_SERVICES="$DIR_CONF/alcasar-services"
ALCASAR_EXCEPTIONS="$DIR_CONF/alcasar-filter-exceptions"
ALCASAR_IP_BLOCKED="$DIR_CONF/alcasar-ip-blocked"
ALCASAR_CONF="$DIR_CONF/alcasar.conf"
 
 
# sort file content
for file in $ALCASAR_SERVICES $ALCASAR_IP_BLOCKED
do
sort -k2n $file > /tmp/alcasar-tmp-sort
mv -f /tmp/alcasar-tmp-sort $file
done
 
# remove empty lines and put rights
for file in $ALCASAR_SERVICES $ALCASAR_EXCEPTIONS $ALCASAR_IP_BLOCKED $ALCASAR_CONF
do
echo $file
$SED "/^$/d" $file
chown root:apache $file
chmod 660 $file
done
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
+*
\ No newline at end of property