Subversion Repositories ALCASAR

Rev

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

Rev 2688 Rev 2689
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 2688 2019-01-18 23:15:49Z lucas.echard $
2
#  $Id: alcasar.sh 2689 2019-01-20 10:50:15Z lucas.echard $
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
5
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
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
#  team@alcasar.net
7
#  team@alcasar.net
Line 1773... Line 1773...
1773
	done
1773
	done
1774
 
1774
 
1775
	$SED "s?^After=.*?After=syslog.target network-online.target chilli.service dnsmasq-whitelist.service?g" /lib/systemd/system/unbound-whitelist.service
1775
	$SED "s?^After=.*?After=syslog.target network-online.target chilli.service dnsmasq-whitelist.service?g" /lib/systemd/system/unbound-whitelist.service
1776
} # End unbound
1776
} # End unbound
1777
 
1777
 
-
 
1778
##################################################
-
 
1779
##              Function "dhcpd"                ##
-
 
1780
##################################################
-
 
1781
dhcpd ()
-
 
1782
{
-
 
1783
	[ -e /etc/dhcpd.conf.default ] || cp /etc/dhcpd.conf /etc/dhcpd.conf.default
-
 
1784
 
-
 
1785
	cat <<EOF > /etc/dhcpd.conf
-
 
1786
ddns-update-style none;
-
 
1787
subnet $PRIVATE_NETWORK netmask $PRIVATE_NETMASK {
-
 
1788
	option routers $PRIVATE_IP;
-
 
1789
	option subnet-mask $PRIVATE_NETMASK;
-
 
1790
	option domain-name-servers $PRIVATE_IP;
-
 
1791
 
-
 
1792
	range dynamic-bootp $PRIVATE_SECOND_IP $PRIVATE_LAST_IP;
-
 
1793
	default-lease-time 21600;
-
 
1794
	max-lease-time 43200;
-
 
1795
}
-
 
1796
EOF
-
 
1797
}
-
 
1798
 
1778
##########################################################
1799
##########################################################
1779
##                      Function "BL"                   ##
1800
##                      Function "BL"                   ##
1780
## - copy Toulouse BL                                   ##
1801
## - copy Toulouse BL                                   ##
1781
## - adapt this BL to ALCASAR architecture              ##
1802
## - adapt this BL to ALCASAR architecture              ##
1782
##     - domain names for unbound-bl & unbound-wl       ##
1803
##     - domain names for unbound-bl & unbound-wl       ##
Line 2426... Line 2447...
2426
			MAJ_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f1`
2447
			MAJ_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f1`
2427
			MIN_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f2`
2448
			MIN_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f2`
2428
			UPD_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f3|cut -c1`
2449
			UPD_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f3|cut -c1`
2429
			mode="update"
2450
			mode="update"
2430
		fi
2451
		fi
2431
		for func in init network ACC CA time_server init_db freeradius chilli e2guardian antivirus tinyproxy ulogd nfsen vnstat dnsmasq unbound BL cron fail2ban gammu_smsd msec letsencrypt post_install
2452
		for func in init network ACC CA time_server init_db freeradius chilli e2guardian antivirus tinyproxy ulogd nfsen vnstat dnsmasq unbound dhcpd BL cron fail2ban gammu_smsd msec letsencrypt post_install
2432
		do
2453
		do
2433
			$func
2454
			$func
2434
			if [ $DEBUG_ALCASAR == "on" ]
2455
			if [ $DEBUG_ALCASAR == "on" ]
2435
			then
2456
			then
2436
				echo "*** 'debug' : end of install '$func' ***"
2457
				echo "*** 'debug' : end of install '$func' ***"