Subversion Repositories ALCASAR

Rev

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

Rev 2838 Rev 2840
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-conf.sh 2838 2020-06-21 22:15:26Z rexy $
2
# $Id: alcasar-conf.sh 2840 2020-06-27 22:35:40Z rexy $
3
 
3
 
4
# alcasar-conf.sh
4
# alcasar-conf.sh
5
# by REXY
5
# by 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
 
7
 
Line 273... Line 273...
273
			$DIR_BIN/alcasar-dns-local.sh --reload
273
			$DIR_BIN/alcasar-dns-local.sh --reload
274
# Logout everybody
274
# Logout everybody
275
			$DIR_BIN/alcasar-logout.sh all
275
			$DIR_BIN/alcasar-logout.sh all
276
# Services stop
276
# Services stop
277
			echo -n "Stop services : "
277
			echo -n "Stop services : "
278
			for i in ntpd tinyproxy e2guardian unbound unbound-whitelist dnsmasq-whitelist unbound-blacklist unbound-blackhole chilli network lighttpd
278
			for i in ntpd e2guardian unbound unbound-whitelist dnsmasq-whitelist unbound-blacklist unbound-blackhole chilli network lighttpd
279
			do
279
			do
280
				/usr/bin/systemctl stop $i && echo -n "$i, "
280
				/usr/bin/systemctl stop $i && echo -n "$i, "
281
			done
281
			done
282
			echo
282
			echo
283
		fi
283
		fi
Line 431... Line 431...
431
	default-lease-time 21600;
431
	default-lease-time 21600;
432
	max-lease-time 43200;
432
	max-lease-time 43200;
433
}
433
}
434
EOF
434
EOF
435
$DIR_BIN/alcasar-dns-local.sh -hosts_to_unbound # add local name resolution to unbound (forward & blackhole)
435
$DIR_BIN/alcasar-dns-local.sh -hosts_to_unbound # add local name resolution to unbound (forward & blackhole)
436
# tinyproxy
-
 
437
		$SED "s?^Listen.*?Listen $PRIVATE_IP?g" /etc/tinyproxy/tinyproxy.conf
-
 
438
# DG + BL
436
# DG + BL
439
		$SED "s?^filterip.*?filterip = $PRIVATE_IP?g" /etc/e2guardian/e2guardian.conf
437
		$SED "s?^filterip.*?filterip = $PRIVATE_IP?g" /etc/e2guardian/e2guardian.conf
440
# Watchdog
438
# Watchdog
441
		$SED "s?^PRIVATE_IP=.*?PRIVATE_IP=\"$PRIVATE_IP\"?g" $DIR_BIN/alcasar-watchdog.sh
439
		$SED "s?^PRIVATE_IP=.*?PRIVATE_IP=\"$PRIVATE_IP\"?g" $DIR_BIN/alcasar-watchdog.sh
442
# Prompts
440
# Prompts
Line 446... Line 444...
446
		if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't launch on install stage
444
		if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't launch on install stage
447
		then
445
		then
448
# Services start
446
# Services start
449
			/usr/bin/systemctl start network && echo -n "Start service : network" && sleep 1
447
			/usr/bin/systemctl start network && echo -n "Start service : network" && sleep 1
450
			$DIR_BIN/alcasar-dhcp.sh -$DHCP_mode && echo -n ", chilli" # apply DHCP mode and start CoovaChilli
448
			$DIR_BIN/alcasar-dhcp.sh -$DHCP_mode && echo -n ", chilli" # apply DHCP mode and start CoovaChilli
451
			for i in unbound unbound-blackhole tinyproxy ntpd
449
			for i in unbound unbound-blackhole ntpd
452
			do
450
			do
453
				sleep 1
451
				sleep 1
454
				/usr/bin/systemctl start $i && echo -n ", $i"
452
				/usr/bin/systemctl start $i && echo -n ", $i"
455
			done
453
			done
456
			$DIR_BIN/alcasar-bl.sh -reload && echo -n ", unbound-blacklist, unbound-whitelist, dnsmasq-whitelist, e2guardian, iptables"
454
			$DIR_BIN/alcasar-bl.sh -reload && echo -n ", unbound-blacklist, unbound-whitelist, dnsmasq-whitelist, e2guardian, iptables"