Changeset 501

Show
Ignore:
Timestamp:
05/08/08 22:11:09 (3 months ago)
Author:
free
Message:

Added ares

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cdd-utils/trunk/cdd-config

    r499 r501  
    11#!/bin/bash -e 
    22 
    3 libdir=/usr/lib/cdd-config 
     3libdir=/usr/lib/cdd-utils 
    44 
    55. $libdir/common.sh 
  • cdd-utils/trunk/lib/server.sh

    r499 r501  
    1 # HAVP antivirus proxy 
    2 havp () { 
    3     cfg=/etc/havp/havp.config 
    4     if ! exists $cfg; then warning $cfg not found; return; fi 
    5     sed -i -e 's/^# PARENTPROXY localhost/PARENTPROXY localhost/' $cfg 
    6     sed -i -e 's/^# PARENTPORT 3128/PARENTPORT 3128/' $cfg 
    7 } 
    8  
    9 # Squid proxy 
    10 squid () { 
    11  
    12     if [ "$1" == "" ]; then 
    13         network="192.168.1.0/24" 
    14     else 
    15         network="$1" 
    16     fi 
    17  
    18     cfg=/etc/squid/squid.conf 
    19     if ! exists $cfg; then warning $cfg not found; return; fi 
    20  
    21     if ! grep -q local_network $cfg; then 
    22         sed -i -e "s|^acl CONNECT method CONNECT|acl CONNECT method CONNECT\nacl local_network src $network|g" $cfg 
    23         sed -i -e "s|^http_access allow manager localhost|http_access allow manager localhost\nhttp_access allow local_network|g" $cfg 
    24     fi 
    25  
    26 } 
    27  
    281# LDAP Address book and users 
    292ldap () { 
     
    3710    fi 
    3811 
     12    # Add additional schemas 
    3913    cfg=/usr/share/evolution-data-server-2.22/evolutionperson.schema 
    4014    if ! exists $cfg; then warning $cfg not found; return; fi 
     
    5024    sed -i -e 's|^#allow bind_v2|allow bind_v2|g' $cfg 
    5125 
    52     # Add additional schemas 
    5326    if ! grep -q evolutionperson $cfg; then 
    5427        sed -i -e 's|^include         /etc/ldap/schema/inetorgperson.schema|include         /etc/ldap/schema/inetorgperson.schema\ninclude         /etc/ldap/schema/evolutionperson.schema|g' $cfg 
     
    5831    fi 
    5932 
    60     # Set ACL (to fix) 
    61 #    if ! grep -q addressbook $cfg; then 
    62 #       sed -i -e 's/^access to \*$/access to dn="ou=people,dc=nodomain"\n        by dn="cn=addressbook,dc=nodomain" read\naccess to \*\n        by dn="cn=addressbook,dc=nodomain" write/g' $cfg 
    63 #    fi 
    6433 
    6534    invoke-rc.d slapd restart > /dev/null 
    6635    sleep 1 
    6736 
    68 #    pwd=$(echo get slapd/password|debconf-communicate|cut -b 3-) 
    6937    pwd=admin 
    7038 
     
    7846        ldapadd -c -x -D cn=admin,dc=nodomain -w $pwd -f $cfg > /dev/null 2>&1 || true 
    7947    done 
     48 
     49} 
     50 
     51# HAVP antivirus proxy 
     52havp () { 
     53    cfg=/etc/havp/havp.config 
     54    if ! exists $cfg; then warning $cfg not found; return; fi 
     55    sed -i -e 's/^# PARENTPROXY localhost/PARENTPROXY localhost/' $cfg 
     56    sed -i -e 's/^# PARENTPORT 3128/PARENTPORT 3128/' $cfg 
     57} 
     58 
     59# Squid proxy 
     60squid () { 
     61 
     62    if [ "$1" == "" ]; then 
     63        network="192.168.1.0/24" 
     64    else 
     65        network="$1" 
     66    fi 
     67 
     68    cfg=/etc/squid/squid.conf 
     69    if ! exists $cfg; then warning $cfg not found; return; fi 
     70 
     71    if ! grep -q local_network $cfg; then 
     72        sed -i -e "s|^acl CONNECT method CONNECT|acl CONNECT method CONNECT\nacl local_network src $network|g" $cfg 
     73        sed -i -e "s|^http_access allow manager localhost|http_access allow manager localhost\nhttp_access allow local_network|g" $cfg 
     74    fi 
    8075 
    8176} 
  • cdd-utils/trunk/lib/suites.sh

    r499 r501  
     1# Ares 
     2ares () { 
     3    cdd-config ldap server 
     4} 
     5 
    16# Mac Impianti 
    27macimpianti () { 
     
    813    fi 
    914    if [ "$1" == "server" ]; then 
    10         cdd-config ldap server 
    1115        cdd-config ldap client 
    1216        cdd-config nfs server