Changeset 506

Show
Ignore:
Timestamp:
05/10/08 15:12:35 (4 months ago)
Author:
free
Message:

* Idempotent ldap, nfs, monit and apt scripts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cdd-utils/trunk/debian/README.ares

    r505 r506  
    25258) Set the host ares in /etc/hosts and the domain name as well 
    2626 
     279) Configure monit mail 
     28 
    2729And finally reboot the machine, as all services have to be restarted. 
  • cdd-utils/trunk/debian/changelog

    r505 r506  
    55  * Splitted functions in library files 
    66  * Code cleanup 
    7   * Idempotent ldap and nfs client scripts 
     7  * Idempotent ldap, nfs, monit and apt scripts 
    88 
    99 -- Free Ekanayaka <free@64studio.com>  Thu, 08 May 2008 21:55:32 +0200 
  • cdd-utils/trunk/lib/server.sh

    r505 r506  
    314314    cfg=/etc/default/monit 
    315315    if ! exists $cfg; then warning $cfg not found; return; fi 
    316     sed -i -e 's|^startup=0|startup=1|g' $cfg 
     316    set_key "startup" "=" "1" $cfg 
    317317    sed -i -e 's|^# CHECK_INTERVALS=.*|CHECK_INTERVALS=30|g' $cfg 
    318318 
    319319    cfg=/etc/monit/monitrc 
    320320    if ! exists $cfg; then warning $cfg not found; return; fi 
    321     if ! grep -q '^include /usr/share/cdd-utils/monit/*' $cfg; then 
    322                 echo 'include /usr/share/cdd-utils/monit/*' >> $cfg 
    323     fi     
     321    add_key "include" " " $cfg 
     322    set_key "include" " " "/usr/share/cdd-utils/monit/*" $cfg 
    324323} 
    325324 
  • cdd-utils/trunk/lib/suites.sh

    r505 r506  
    2222    cdd-config klogd 
    2323    cdd-config dnsmasq 
    24     cdd-config backup /dev/sdb1 
     24    cdd-config monit 
    2525} 
    2626 
  • cdd-utils/trunk/lib/system.sh

    r499 r506  
    5959    mother=$2 
    6060    list=/etc/apt/sources.list.d/$suite.list 
    61     if ! exists $list; then 
     61    if ! exists $list || ! [ -z "$mother" ]; then 
    6262        echo "deb http://apt.64studio.com/$suite/stable $mother main" > $list 
    6363    fi