Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2847 → Rev 2846

/alcasar.sh
23,6 → 23,7
# Options :
# -i or --install
# -u or --uninstall
 
# Functions :
# testing : connectivity tests, free space test and mageia version test
# init : Installation of RPM and scripts
221,15 → 222,12
mode="update"
fi
fi
# 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
# Test free space on /var
free_space=`df -BG --output=avail /var|tail -1|tr -d '[:space:]G'`
if [ $free_space -lt 10 ]
then
if [ $Lang == "fr" ]
then echo "Espace disponible insuffisant sur /var ($free_space Go au lieu de 10 Go au minimum)"
then echo "place disponible sur /var insufisante ($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
1980,6 → 1978,8
/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,7 → 2326,8
# Extract some info from the previous configuration file
cd /var/tmp
tar -xf /var/tmp/alcasar-conf.tar.gz conf/etc/alcasar.conf
if [ "$mode" == "install" ] # don't display this if updating a running version
cd $DIR_INSTALL
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`
2354,7 → 2355,6
fi
done
fi
cd $DIR_INSTALL
fi
# Test if update
if [ -e /var/tmp/alcasar-conf.tar.gz ]