Subversion Repositories ALCASAR

Rev

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

Rev 636 Rev 637
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#  $Id: alcasar.sh 636 2011-06-15 22:29:07Z richard $ 
2
#  $Id: alcasar.sh 637 2011-06-16 21:56:59Z richard $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 297... Line 297...
297
			done
297
			done
298
		else
298
		else
299
       			PRIVATE_IP_MASK=$DEFAULT_PRIVATE_IP_MASK
299
       			PRIVATE_IP_MASK=$DEFAULT_PRIVATE_IP_MASK
300
		fi
300
		fi
301
	else
301
	else
302
		PRIVATE_IP_MASK=`grep PRIVATE_IP |cut -d"=" -f2` /tmp/conf/etc/alcasar.conf
302
		PRIVATE_IP_MASK=`grep PRIVATE_IP conf/etc/alcasar.conf|cut -d"=" -f2` 
-
 
303
		rm -rf conf/etc/alcasar.conf
303
	fi
304
	fi
304
# Définition de la config réseau côté "LAN de consultation"
305
# Définition de la config réseau côté "LAN de consultation"
305
	hostname $HOSTNAME
306
	hostname $HOSTNAME
306
	PRIVATE_NETWORK=`/bin/ipcalc -n $PRIVATE_IP_MASK | cut -d"=" -f2`			# @ réseau de consultation (ex.: 192.168.182.0)
307
	PRIVATE_NETWORK=`/bin/ipcalc -n $PRIVATE_IP_MASK | cut -d"=" -f2`			# @ réseau de consultation (ex.: 192.168.182.0)
307
	PRIVATE_NETMASK=`/bin/ipcalc -m $PRIVATE_IP_MASK | cut -d"=" -f2`			# masque réseau de consultation (ex.: 255.255.255.0)
308
	PRIVATE_NETMASK=`/bin/ipcalc -m $PRIVATE_IP_MASK | cut -d"=" -f2`			# masque réseau de consultation (ex.: 255.255.255.0)
Line 1508... Line 1509...
1508
			if [ $Lang == "fr" ]
1509
			if [ $Lang == "fr" ]
1509
				then echo "#### Installation avec mise à jour ####";
1510
				then echo "#### Installation avec mise à jour ####";
1510
				else echo "#### Installation with update     ####";
1511
				else echo "#### Installation with update     ####";
1511
			fi
1512
			fi
1512
# Extract the central configuration file
1513
# Extract the central configuration file
1513
			tar -xvf /tmp/alcasar-conf.tar.gz conf/etc/alcasar.conf -C /tmp
1514
			tar -xf /tmp/alcasar-conf.tar.gz conf/etc/alcasar.conf 
1514
			ORGANISME=`cat /tmp/conf/etc/alcasar.conf|grep ORGANISM|cut -d"=" -f2`
1515
			ORGANISME=`grep ORGANISM conf/etc/alcasar.conf|cut -d"=" -f2`
1515
			mode="update"
1516
			mode="update"
1516
		else
1517
		else
1517
			mode="install"
1518
			mode="install"
1518
		fi
1519
		fi
1519
		for func in init network gestion AC init_db param_radius param_web_radius param_chilli param_squid param_dansguardian antivirus param_ulogd param_awstats param_dnsmasq BL cron post_install
1520
		for func in init network gestion AC init_db param_radius param_web_radius param_chilli param_squid param_dansguardian antivirus param_ulogd param_awstats param_dnsmasq BL cron post_install
1520
		do
1521
		do
1521
			$func
1522
			$func
1522
 echo "*** 'debug' : end of function $func ***"; read a
1523
# echo "*** 'debug' : end of function $func ***"; read a
1523
		done
1524
		done
1524
		;;
1525
		;;
1525
	-u | --uninstall)
1526
	-u | --uninstall)
1526
		if [ ! -e $DIR_DEST_SBIN/alcasar-uninstall.sh ]
1527
		if [ ! -e $DIR_DEST_SBIN/alcasar-uninstall.sh ]
1527
		then
1528
		then