Subversion Repositories ALCASAR

Rev

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

Rev 2568 Rev 2569
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-conf.sh 2568 2018-07-12 21:49:03Z rexy $
2
# $Id: alcasar-conf.sh 2569 2018-07-14 09:17:12Z lucas.echard $
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 258... Line 258...
258
		then
258
		then
259
			if [ $DHCP_mode = "off" ] || [ $DHCP_mode = "Off" ] || [ $DHCP_mode = "OFF" ]
259
			if [ $DHCP_mode = "off" ] || [ $DHCP_mode = "Off" ] || [ $DHCP_mode = "OFF" ]
260
			then
260
			then
261
				$DIR_BIN/alcasar-dhcp.sh --off
261
				$DIR_BIN/alcasar-dhcp.sh --off
262
			else
262
			else
263
			        $DIR_BIN/alcasar-dhcp.sh --on
263
				$DIR_BIN/alcasar-dhcp.sh --on
264
			fi
264
			fi
265
 
265
 
266
# Set the local DNS (or not)
266
# Set the local DNS (or not)
267
			if [ $INT_DNS_mode = "on" ] || [ $INT_DNS_mode = "On" ] || [ $INT_DNS_mode = "ON" ]
267
			if [ $INT_DNS_mode = "on" ] || [ $INT_DNS_mode = "On" ] || [ $INT_DNS_mode = "ON" ]
268
			then
268
			then
Line 273... Line 273...
273
 
273
 
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 dnsmasq dnsmasq-whitelist dnsmasq-blacklist dnsmasq-blackhole chilli network lighttpd
278
			for i in ntpd tinyproxy e2guardian dnsmasq dnsmasq-whitelist dnsmasq-blacklist dnsmasq-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 395... Line 395...
395
			for i in dnsmasq dnsmasq-blackhole tinyproxy ntpd
395
			for i in dnsmasq dnsmasq-blackhole tinyproxy ntpd
396
			do
396
			do
397
				sleep 1
397
				sleep 1
398
				/usr/bin/systemctl start $i && echo -n ", $i"
398
				/usr/bin/systemctl start $i && echo -n ", $i"
399
			done
399
			done
400
			$DIR_BIN/alcasar-bl.sh -reload && echo -n ", dnsmasq-blacklist, dnsmasq-whitelist, iptables"
400
			$DIR_BIN/alcasar-bl.sh -reload && echo -n ", dnsmasq-blacklist, dnsmasq-whitelist, e2guardian, iptables"
401
			/usr/bin/systemctl restart lighttpd && echo -n ", lighttpd"
401
			/usr/bin/systemctl restart lighttpd && echo -n ", lighttpd"
402
		fi
402
		fi
403
# Start / Stop SSH Daemon
403
# Start / Stop SSH Daemon
404
		ssh_active=`grep ^SSH= $CONF_FILE|cut -d"=" -f2`
404
		ssh_active=`grep ^SSH= $CONF_FILE|cut -d"=" -f2`
405
		if [ $ssh_active = "on" ]
405
		if [ $ssh_active = "on" ]