Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2582 → Rev 2583

/scripts/alcasar-conf.sh
336,10 → 336,9
# Set hostname
hostnamectl set-hostname $HOSTNAME.$DOMAIN
# /etc/hosts
cat <<EOF > /etc/hosts
127.0.0.1 localhost
$PRIVATE_IP $HOSTNAME
EOF
$SED "/^$PRIVATE_IP\t/d" /etc/hosts
$SED "/$HOSTNAME$/d" /etc/hosts
echo "$PRIVATE_IP $HOSTNAME" >> /etc/hosts
# Lighttpd
$SED "s?^server\.bind.*?server\.bind = \"$HOSTNAME.$DOMAIN\"?g" /etc/lighttpd/lighttpd.conf
$SED 's/^$SERVER\["socket"\] == ".*:443.*/$SERVER\["socket"\] == "'"$HOSTNAME.$DOMAIN"':443" {/g' /etc/lighttpd/vhosts.d/alcasar.conf
/scripts/alcasar-daemon.sh
12,6 → 12,8
SSH=${SSH:=off}
LDAP=`grep ^LDAP= $conf_file|cut -d"=" -f2` # ldap active (on/off)
LDAP=${LDAP:=off}
INTIF=`grep ^INTIF= $conf_file|cut -d"=" -f2` # INTIF name
EXTIF=`grep ^EXTIF= $conf_file|cut -d"=" -f2` # EXTIF name
SERVICES="mysqld lighttpd php-fpm ntpd havp dnsmasq dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole radiusd tinyproxy nfsen e2guardian freshclam ulogd-ssh ulogd-traceability ulogd-ext-access chilli fail2ban sshd vnstat"
nb_available_srv=`echo $SERVICES|wc -w`
 
27,6 → 29,15
fi
}
 
for NIC in $EXTIF $INTIF
do
if [ `/usr/sbin/ip a show $NIC|grep DOWN|wc -l` -eq "1" ]
then
echo "The network interface card '$NIC' is down! Try to enable it"
/usr/sbin/ifup $NIC
fi
done
 
nb_srv=0
for s in $SERVICES
do
67,3 → 78,4
/usr/local/bin/alcasar-ldap.sh -on
fi
fi