Subversion Repositories ALCASAR

Rev

Rev 1253 | Rev 1266 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1253 Rev 1261
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 1253 2013-10-27 13:30:30Z richard $ 
2
#  $Id: alcasar.sh 1261 2013-12-12 22:35:13Z richard $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
 
5
 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
7
# Ce programme est un logiciel libre ; This software is free and open source
7
# Ce programme est un logiciel libre ; This software is free and open source
Line 1522... Line 1522...
1522
# actualisation des fichiers logs compressés
1522
# actualisation des fichiers logs compressés
1523
	for dir in firewall squid dansguardian httpd
1523
	for dir in firewall squid dansguardian httpd
1524
	do
1524
	do
1525
	      find /var/log/$dir -type f -name *.log-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] -exec gzip {} \;
1525
	      find /var/log/$dir -type f -name *.log-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] -exec gzip {} \;
1526
	done
1526
	done
1527
# export des logs en 'retard' dans /var/Save/logs
-
 
1528
	/usr/local/bin/alcasar-archive.sh --now
-
 
1529
# create the alcasar-load_balancing unit
1527
# create the alcasar-load_balancing unit
1530
	cat << EOF > /lib/systemd/system/alcasar-load_balancing.service
1528
	cat << EOF > /lib/systemd/system/alcasar-load_balancing.service
1531
#  This file is part of systemd.
1529
#  This file is part of systemd.
1532
#
1530
#
1533
#  systemd is free software; you can redistribute it and/or modify it
1531
#  systemd is free software; you can redistribute it and/or modify it
Line 1647... Line 1645...
1647
		fi
1645
		fi
1648
	done
1646
	done
1649
# Load and apply the previous conf file
1647
# Load and apply the previous conf file
1650
	if [ "$mode" = "update" ]
1648
	if [ "$mode" = "update" ]
1651
	then
1649
	then
-
 
1650
		# export des logs en 'retard' dans /var/Save/logs
-
 
1651
		/usr/local/bin/alcasar-archive.sh --now
1652
		$DIR_DEST_BIN/alcasar-conf.sh --load
1652
		$DIR_DEST_BIN/alcasar-conf.sh --load
1653
		PARENT_SCRIPT=`basename $0`
1653
		PARENT_SCRIPT=`basename $0`
1654
		export PARENT_SCRIPT # to avoid stop&start process during the installation process
1654
		export PARENT_SCRIPT # to avoid stop&start process during the installation process
1655
		$DIR_DEST_BIN/alcasar-conf.sh --apply
1655
		$DIR_DEST_BIN/alcasar-conf.sh --apply
1656
		$SED "s?^INSTALL_DATE=.*?INSTALL_DATE=$DATE?g" $CONF_FILE
1656
		$SED "s?^INSTALL_DATE=.*?INSTALL_DATE=$DATE?g" $CONF_FILE