Subversion Repositories ALCASAR

Rev

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

Rev 1581 Rev 1583
Line 1... Line 1...
1
#/bin/bash
1
#/bin/bash
2
# $Id: alcasar-conf.sh 1581 2015-03-03 22:36:58Z richard $
2
# $Id: alcasar-conf.sh 1583 2015-03-05 08:39:04Z richard $
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 206... Line 206...
206
		then
206
		then
207
			if [ $DHCP_mode = "off" ]
207
			if [ $DHCP_mode = "off" ]
208
			then
208
			then
209
				$DIR_SBIN/alcasar-dhcp.sh --off
209
				$DIR_SBIN/alcasar-dhcp.sh --off
210
			fi
210
			fi
211
# Logout everybody
-
 
212
			$DIR_SBIN/alcasar-logout.sh all		
211
			$DIR_SBIN/alcasar-logout.sh all
213
# Services stop
-
 
214
			echo -n "Stop services : "
212
			echo -n "Stop services : "
215
			for i in ntpd httpd tinyproxy dnsmasq dnsmasq-whitelist dnsmasq-blacklist chilli network 
213
			for i in ntpd httpd tinyproxy dnsmasq dnsmasq-whitelist dnsmasq-blacklist chilli network 
216
			do
214
			do
217
				/usr/bin/systemctl stop $i && echo -n "$i, "
215
				/usr/bin/systemctl stop $i && echo -n "$i, "
218
			done
216
			done
219
			echo
217
			echo
220
		fi
218
		fi
221
 
219
 
222
# /etc/hosts
220
# /etc/hosts
223
		cat <<EOF > /etc/hosts
-
 
224
127.0.0.1	localhost
-
 
225
$PRIVATE_IP	$HOSTNAME $HOSTNAME.$DOMAIN
221
		$SED "/alcasar/s?.*?$PRIVATE_IP\talcasar alcasar.localdomain?g" /etc/hosts
226
EOF
-
 
227
 
-
 
228
# EXTIF config
222
# EXTIF config
229
		$SED "s?^IPADDR=.*?IPADDR=$PUBLIC_IP?" /etc/sysconfig/network-scripts/ifcfg-$EXTIF
223
		$SED "s?^IPADDR=.*?IPADDR=$PUBLIC_IP?" /etc/sysconfig/network-scripts/ifcfg-$EXTIF
230
		$SED "s?^NETMASK=.*?NETMASK=$PUBLIC_NETMASK?" /etc/sysconfig/network-scripts/ifcfg-$EXTIF
224
		$SED "s?^NETMASK=.*?NETMASK=$PUBLIC_NETMASK?" /etc/sysconfig/network-scripts/ifcfg-$EXTIF
231
		$SED "s?^GATEWAY=.*?GATEWAY=$PUBLIC_GATEWAY?" /etc/sysconfig/network-scripts/ifcfg-$EXTIF
225
		$SED "s?^GATEWAY=.*?GATEWAY=$PUBLIC_GATEWAY?" /etc/sysconfig/network-scripts/ifcfg-$EXTIF
232
# INTIF config (for bypass mode only)
226
# INTIF config (for bypass mode only)