Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2844 → Rev 2847

/alcasar.sh
23,7 → 23,6
# Options :
# -i or --install
# -u or --uninstall
 
# Functions :
# testing : connectivity tests, free space test and mageia version test
# init : Installation of RPM and scripts
222,12 → 221,15
mode="update"
fi
fi
# Test free space on /var
# Free /var (when updating) and test free space
[ -d /var/log/netflow ] && rm -rf /var/log/netflow # remove old porttracker RRD database
[ -d /var/lib/clamav ] && rm -rf /var/lib/clamav # remove old clamav database
journalctl -q --vacuum-files 1 # remove previous journal logs
free_space=`df -BG --output=avail /var|tail -1|tr -d '[:space:]G'`
if [ $free_space -lt 10 ]
then
if [ $Lang == "fr" ]
then echo "place disponible sur /var insufisante ($free_space Go au lieu de 10 Go au minimum)"
then echo "Espace disponible insuffisant sur /var ($free_space Go au lieu de 10 Go au minimum)"
else echo "not enough free space on /var ($free_space GB instead of at least 10 GB)"
fi
exit 0
1978,8 → 1980,6
/etc/pki/CA/private/* root.root 600
/etc/pki/tls/private/ root.apache 750
/etc/pki/tls/private/* root.apache 640
/var/log/netflow/porttracker root.apache 770
/var/log/netflow/porttracker/* root.apache 660
EOF
# apply now hourly & daily checks
/usr/sbin/msec
2315,11 → 2315,11
$DIR_DEST_BIN/alcasar-uninstall.sh -full
fi
fi
if [ $DEBUG_ALCASAR == "on" ]
then
echo "*** 'debug' : end of cleaning ***"
read
fi
if [ $DEBUG_ALCASAR == "on" ]
then
echo "*** 'debug' : end of cleaning ***"
read
fi
# Test if conf file
if [ -e /var/tmp/alcasar-conf.tar.gz ]
then
2326,8 → 2326,7
# Extract some info from the previous configuration file
cd /var/tmp
tar -xf /var/tmp/alcasar-conf.tar.gz conf/etc/alcasar.conf
cd $DIR_INSTALL
if [ "mode" == "install" ] # don't display this if updating a running version
if [ "$mode" == "install" ] # don't display this if updating a running version
then
header_install
ORGANISME=`grep ^ORGANISM= conf/etc/alcasar.conf|cut -d"=" -f2`
2355,6 → 2354,7
fi
done
fi
cd $DIR_INSTALL
fi
# Test if update
if [ -e /var/tmp/alcasar-conf.tar.gz ]