Subversion Repositories ALCASAR

Rev

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

Rev 2580 Rev 2583
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-conf.sh 2580 2018-07-25 22:12:59Z rexy $
2
# $Id: alcasar-conf.sh 2583 2018-07-27 10:01:29Z 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 334... Line 334...
334
ntpd: $PRIVATE_NETWORK_SHORT
334
ntpd: $PRIVATE_NETWORK_SHORT
335
EOF
335
EOF
336
# Set hostname
336
# Set hostname
337
		hostnamectl set-hostname $HOSTNAME.$DOMAIN
337
		hostnamectl set-hostname $HOSTNAME.$DOMAIN
338
# /etc/hosts
338
# /etc/hosts
339
		cat <<EOF > /etc/hosts
339
		$SED "/^$PRIVATE_IP\t/d" /etc/hosts
340
127.0.0.1	localhost
340
		$SED "/$HOSTNAME$/d" /etc/hosts
341
$PRIVATE_IP	$HOSTNAME
341
		echo "$PRIVATE_IP	$HOSTNAME" >> /etc/hosts
342
EOF
-
 
343
# Lighttpd
342
# Lighttpd
344
		$SED "s?^server\.bind.*?server\.bind = \"$HOSTNAME.$DOMAIN\"?g" /etc/lighttpd/lighttpd.conf
343
		$SED "s?^server\.bind.*?server\.bind = \"$HOSTNAME.$DOMAIN\"?g" /etc/lighttpd/lighttpd.conf
345
		$SED 's/^$SERVER\["socket"\] == ".*:443.*/$SERVER\["socket"\] == "'"$HOSTNAME.$DOMAIN"':443" {/g' /etc/lighttpd/vhosts.d/alcasar.conf
344
		$SED 's/^$SERVER\["socket"\] == ".*:443.*/$SERVER\["socket"\] == "'"$HOSTNAME.$DOMAIN"':443" {/g' /etc/lighttpd/vhosts.d/alcasar.conf
346
		$SED "s/^\([\t ]*\)var.server_name.*/\1var.server_name = \"$HOSTNAME.$DOMAIN\"/g" /etc/lighttpd/vhosts.d/alcasar.conf
345
		$SED "s/^\([\t ]*\)var.server_name.*/\1var.server_name = \"$HOSTNAME.$DOMAIN\"/g" /etc/lighttpd/vhosts.d/alcasar.conf
347
# FreeRADIUS Web
346
# FreeRADIUS Web