Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-conf.sh 2600 2018-08-19 23:48:55Z tom.houdayer $
|
2 |
# $Id: alcasar-conf.sh 2603 2018-08-20 00:05:21Z tom.houdayer $
|
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 356... |
Line 356... |
356 |
[ "$HOSTNAME" != 'alcasar' ] && domainNames="alcasar $domainNames"
|
356 |
[ "$HOSTNAME" != 'alcasar' ] && domainNames="alcasar $domainNames"
|
357 |
$SED "/^$PRIVATE_IP\t/d" /etc/hosts
|
357 |
$SED "/^$PRIVATE_IP\t/d" /etc/hosts
|
358 |
$SED "/\s$HOSTNAME\s\$/d" /etc/hosts
|
358 |
$SED "/\s$HOSTNAME\s\$/d" /etc/hosts
|
359 |
[ "$HOSTNAME" != 'alcasar' ] && $SED "/\salcasar\s\$/d" /etc/hosts
|
359 |
[ "$HOSTNAME" != 'alcasar' ] && $SED "/\salcasar\s\$/d" /etc/hosts
|
360 |
echo "$PRIVATE_IP $domainNames" >> /etc/hosts
|
360 |
echo "$PRIVATE_IP $domainNames" >> /etc/hosts
|
- |
|
361 |
# MOTD
|
- |
|
362 |
$SED "s@'https://\(.\+\)/acc'@'https://$HOSTNAME.$DOMAIN/acc'@" /etc/mageia-release
|
361 |
# Lighttpd
|
363 |
# Lighttpd
|
362 |
$SED "s?^server\.bind.*?server\.bind = \"$HOSTNAME.$DOMAIN\"?g" /etc/lighttpd/lighttpd.conf
|
364 |
$SED "s?^server\.bind.*?server\.bind = \"$HOSTNAME.$DOMAIN\"?g" /etc/lighttpd/lighttpd.conf
|
363 |
$SED 's/^$SERVER\["socket"\] == ".*:443.*/$SERVER\["socket"\] == "'"$HOSTNAME.$DOMAIN"':443" {/g' /etc/lighttpd/vhosts.d/alcasar.conf
|
365 |
$SED 's/^$SERVER\["socket"\] == ".*:443.*/$SERVER\["socket"\] == "'"$HOSTNAME.$DOMAIN"':443" {/g' /etc/lighttpd/vhosts.d/alcasar.conf
|
364 |
$SED "s/^\([\t ]*\)var.server_name.*/\1var.server_name = \"$HOSTNAME.$DOMAIN\"/g" /etc/lighttpd/vhosts.d/alcasar.conf
|
366 |
$SED "s/^\([\t ]*\)var.server_name.*/\1var.server_name = \"$HOSTNAME.$DOMAIN\"/g" /etc/lighttpd/vhosts.d/alcasar.conf
|
365 |
# FreeRADIUS Web
|
367 |
# FreeRADIUS Web
|