Subversion Repositories ALCASAR

Rev

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

Rev 2013 Rev 2016
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2013 2016-07-28 15:51:12Z raphael.pion $ 
2
#  $Id: alcasar.sh 2016 2016-08-11 13:02:01Z raphael.pion $ 
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 1154... Line 1154...
1154
EOF
1154
EOF
1155
chmod a+x /etc/init.d/chilli
1155
chmod a+x /etc/init.d/chilli
1156
ln -s /etc/init.d/chilli /usr/libexec/chilli
1156
ln -s /etc/init.d/chilli /usr/libexec/chilli
1157
# conf file creation
1157
# conf file creation
1158
	[ -e /etc/chilli.conf.default ] || cp /etc/chilli.conf /etc/chilli.conf.default
1158
	[ -e /etc/chilli.conf.default ] || cp /etc/chilli.conf /etc/chilli.conf.default
-
 
1159
	#NTP Option configuration for DHCP
-
 
1160
	PRIVATE_IP_HEXA=$(printf "%02x\n" $(echo $PRIVATE_IP | cut -d'.' -f1))$(printf "%02x\n" $(echo $PRIVATE_IP | cut -d'.' -f2))$(printf "%02x\n" $(echo $PRIVATE_IP | cut -d'.' -f3))$(printf "%02x\n" $(echo $PRIVATE_IP | cut -d'.' -f4))
1159
	cat <<EOF > /etc/chilli.conf
1161
	cat <<EOF > /etc/chilli.conf
1160
# coova config for ALCASAR
1162
# coova config for ALCASAR
1161
cmdsocket	/var/run/chilli.sock
1163
cmdsocket	/var/run/chilli.sock
1162
unixipc		chilli.$INTIF.ipc
1164
unixipc		chilli.$INTIF.ipc
1163
pidfile		/var/run/chilli.pid
1165
pidfile		/var/run/chilli.pid
Line 1188... Line 1190...
1188
coaport		3799
1190
coaport		3799
1189
conup		$DIR_DEST_BIN/alcasar-conup.sh
1191
conup		$DIR_DEST_BIN/alcasar-conup.sh
1190
condown		$DIR_DEST_BIN/alcasar-condown.sh
1192
condown		$DIR_DEST_BIN/alcasar-condown.sh
1191
include		$DIR_DEST_ETC/alcasar-uamallowed
1193
include		$DIR_DEST_ETC/alcasar-uamallowed
1192
include		$DIR_DEST_ETC/alcasar-uamdomain
1194
include		$DIR_DEST_ETC/alcasar-uamdomain
-
 
1195
dhcpopt		2a04$PRIVATE_IP_HEXA
1193
#dhcpgateway		none
1196
#dhcpgateway		none
1194
#dhcprelayagent		none
1197
#dhcprelayagent		none
1195
#dhcpgatewayport	none
1198
#dhcpgatewayport	none
1196
#dhcpopt		none
-
 
1197
EOF
1199
EOF
1198
# create file for DHCP static ip. Reserve the second IP address for INTIF (the first one is for tun0)
1200
# create file for DHCP static ip. Reserve the second IP address for INTIF (the first one is for tun0)
1199
	echo "$PRIVATE_MAC $PRIVATE_SECOND_IP" > $DIR_DEST_ETC/alcasar-ethers
1201
	echo "$PRIVATE_MAC $PRIVATE_SECOND_IP" > $DIR_DEST_ETC/alcasar-ethers
1200
# create files for trusted domains and urls
1202
# create files for trusted domains and urls
1201
	touch $DIR_DEST_ETC/alcasar-uamallowed $DIR_DEST_ETC/alcasar-uamdomain
1203
	touch $DIR_DEST_ETC/alcasar-uamallowed $DIR_DEST_ETC/alcasar-uamdomain
Line 1868... Line 1870...
1868
# sshd autorise les connections root par certificat
1870
# sshd autorise les connections root par certificat
1869
	$SED "s?^PermitRootLogin.*?PermitRootLogin without-password?g" /etc/ssh/sshd_config
1871
	$SED "s?^PermitRootLogin.*?PermitRootLogin without-password?g" /etc/ssh/sshd_config
1870
	# Put the default values in conf file
1872
	# Put the default values in conf file
1871
	echo "SSH=on" >> $CONF_FILE
1873
	echo "SSH=on" >> $CONF_FILE
1872
	echo "SSH_ADMIN_FROM=0.0.0.0/0.0.0.0" >> $CONF_FILE
1874
	echo "SSH_ADMIN_FROM=0.0.0.0/0.0.0.0" >> $CONF_FILE
1873
	echo "CHILLI_NTP_ENABLED=off" >> $CONF_FILE
-
 
1874
	echo "CHILLI_NTP_IP=none" >> $CONF_FILE
-
 
1875
	echo "LDAP=off" >> $CONF_FILE
1875
	echo "LDAP=off" >> $CONF_FILE
1876
	echo "LDAP_IP=0.0.0.0/0.0.0.0" >> $CONF_FILE
1876
	echo "LDAP_IP=0.0.0.0/0.0.0.0" >> $CONF_FILE
1877
	echo "MULTIWAN=off" >> $CONF_FILE
1877
	echo "MULTIWAN=off" >> $CONF_FILE
1878
	echo "FAILOVER=30" >> $CONF_FILE
1878
	echo "FAILOVER=30" >> $CONF_FILE
1879
	echo "## WANx=active,@IPx/mask,GWx,Weight,MTUx" >> $CONF_FILE
1879
	echo "## WANx=active,@IPx/mask,GWx,Weight,MTUx" >> $CONF_FILE