Subversion Repositories ALCASAR

Rev

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

Rev 1369 Rev 1370
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 1369 2014-06-03 16:23:07Z richard $ 
2
#  $Id: alcasar.sh 1370 2014-06-03 21:16:25Z 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 878... Line 878...
878
## - Création du fichier d'initialisation et de configuration de coova-chilli	##
878
## - Création du fichier d'initialisation et de configuration de coova-chilli	##
879
## - Paramètrage de la page d'authentification (intercept.php)			##
879
## - Paramètrage de la page d'authentification (intercept.php)			##
880
##################################################################################
880
##################################################################################
881
param_chilli ()
881
param_chilli ()
882
{
882
{
-
 
883
# chilli unit for systemd
-
 
884
cat << EOF > /lib/systemd/system/chilli.service
-
 
885
[Unit]
-
 
886
Description=chilli is a captive portal daemon
-
 
887
After=network.target
-
 
888
 
-
 
889
[Service]
-
 
890
Type=forking
-
 
891
ExecStart=/usr/libexec/chilli start
-
 
892
ExecStop=/usr/libexec/chilli stop
-
 
893
ExecReload=/usr/libexec/chilli reload
-
 
894
PIDFile=/var/run/chilli.pid
-
 
895
 
-
 
896
[Install]
-
 
897
WantedBy=multi-user.target
-
 
898
EOF
883
# init file creation
899
# init file creation
884
	[ -e /etc/init.d/chilli.default ] || cp /etc/init.d/chilli /etc/init.d/chilli.default
900
	[ -e /etc/init.d/chilli.default ] || mv /etc/init.d/chilli /etc/init.d/chilli.default
885
	cat <<EOF > /etc/init.d/chilli
901
	cat <<EOF > /usr/libexec/chilli
886
#!/bin/sh
902
#!/bin/sh
887
#
903
#
888
# chilli CoovaChilli init
904
# chilli CoovaChilli init
889
#
905
#
890
# chkconfig: 2345 65 35
906
# chkconfig: 2345 65 35
Line 1329... Line 1345...
1329
EOF
1345
EOF
1330
# change the the google safesearch ("safe=strict" instead of "safe=vss")
1346
# change the the google safesearch ("safe=strict" instead of "safe=vss")
1331
	$SED "s?safe=vss?safe=strict?g" $DIR_DG/lists/urlregexplist
1347
	$SED "s?safe=vss?safe=strict?g" $DIR_DG/lists/urlregexplist
1332
	chown -R dansguardian:apache $DIR_DG
1348
	chown -R dansguardian:apache $DIR_DG
1333
	chmod -R g+rw $DIR_DG
1349
	chmod -R g+rw $DIR_DG
1334
# On adapte la BL de Toulouse à notre structure
1350
# adapt the BL to ALCASAR architecture. Enable the default categories
1335
	if [ "$mode" != "update" ]; then
1351
	if [ "$mode" != "update" ]; then
1336
		$DIR_DEST_SBIN/alcasar-bl.sh --adapt
1352
		$DIR_DEST_SBIN/alcasar-bl.sh --adapt
-
 
1353
		$DIR_DEST_SBIN/alcasar-bl.sh --cat_choice
1337
	fi
1354
	fi
1338
}
1355
}
1339
 
1356
 
1340
##########################################################
1357
##########################################################
1341
##		Fonction "cron"				##
1358
##		Fonction "cron"				##