Subversion Repositories ALCASAR

Rev

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

Rev 288 Rev 291
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#  $Id: alcasar.sh 288 2010-09-27 22:05:25Z richard $ 
2
#  $Id: alcasar.sh 291 2010-10-01 11:46:39Z franck $ 
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 1080... Line 1080...
1080
#dhcp-option=3,1.2.3.4
1080
#dhcp-option=3,1.2.3.4
1081
#dhcp-option=option:router,1.2.3.4
1081
#dhcp-option=option:router,1.2.3.4
1082
#dhcp-option=42,0.0.0.0
1082
#dhcp-option=42,0.0.0.0
1083
#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5
1083
#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5
1084
 
1084
 
1085
# Exemple de configuration statique
1085
# Exemple de configuration statique : <@MAC>,<name>,<@IP>,<MASK>,<ttl bail>
1086
#dhcp-host=11:22:33:44:55:66,ssic-test,192.168.10.20,255.255.255.0,45m
1086
#dhcp-host=11:22:33:44:55:66,ssic-test,192.168.10.20,255.255.255.0,45m
1087
EOF
1087
EOF
1088
	mkdir /usr/local/etc/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
1088
	mkdir /usr/local/etc/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
1089
	chown -R 770 /usr/local/etc/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
1089
	chown -R 770 /usr/local/etc/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
1090
	chown -R root:apache /usr/local/etc/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
1090
	chown -R root:apache /usr/local/etc/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
Line 1274... Line 1274...
1274
} # End post_install ()
1274
} # End post_install ()
1275
 
1275
 
1276
#################################
1276
#################################
1277
#  Boucle principale du script  #
1277
#  Boucle principale du script  #
1278
#################################
1278
#################################
1279
usage="Usage: alcasar.sh -install | -uninstall"
1279
usage="Usage: alcasar.sh {-i or --install} | {-u or --uninstall}"
1280
nb_args=$#
1280
nb_args=$#
1281
args=$1
1281
args=$1
1282
if [ $nb_args -eq 0 ]
1282
if [ $nb_args -eq 0 ]
1283
then
1283
then
1284
	nb_args=1
1284
	nb_args=1
Line 1287... Line 1287...
1287
case $args in
1287
case $args in
1288
	-\? | -h* | --h*)
1288
	-\? | -h* | --h*)
1289
		echo "$usage"
1289
		echo "$usage"
1290
		exit 0
1290
		exit 0
1291
		;;
1291
		;;
1292
	-install)
1292
	-i | --install)
1293
		header_install
1293
		header_install
1294
		testing
1294
		testing
1295
# On teste la présence d'une version déjà installée
1295
# On teste la présence d'une version déjà installée
1296
		header_install
1296
		header_install
1297
		if [ -e $DIR_WEB/VERSION ]
1297
		if [ -e $DIR_WEB/VERSION ]
Line 1358... Line 1358...
1358
		do
1358
		do
1359
			$func
1359
			$func
1360
# echo "*** 'debug' : end of function $func ***"; read a
1360
# echo "*** 'debug' : end of function $func ***"; read a
1361
		done
1361
		done
1362
		;;
1362
		;;
1363
	-uninstall)
1363
	-u | --uninstall)
1364
		if [ ! -e $DIR_DEST_SBIN/alcasar-uninstall.sh ]
1364
		if [ ! -e $DIR_DEST_SBIN/alcasar-uninstall.sh ]
1365
		then
1365
		then
1366
			echo "Aucune version d'ALCASAR n'a été trouvée.";
1366
			echo "Aucune version d'ALCASAR n'a été trouvée.";
1367
			exit 0
1367
			exit 0
1368
		fi
1368
		fi