Changeset 546

Show
Ignore:
Timestamp:
05/19/08 17:20:08 (7 months ago)
Author:
free
Message:

* Set monit email address properly

Location:
cdd-utils/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • cdd-utils/trunk/debian/changelog

    r545 r546  
    2020  * Encrypt passwords when changing the manager account 
    2121  * Added support for setting the hostname 
     22  * Set monit email address properly 
    2223 
    2324 -- Free Ekanayaka <free@64studio.com>  Thu, 08 May 2008 21:55:32 +0200 
  • cdd-utils/trunk/lib/server.sh

    r545 r546  
    9797postfix () { 
    9898 
     99    root="$1" 
     100    if nullstr "$root"; then warning "No root mail address given"; return; fi 
     101 
    99102    cfg=/etc/postfix/main.cf 
    100103    if ! exists $cfg; then warning $cfg not found; return; fi 
     
    111114    add_key $key $sep $cfg 
    112115    set_key $key $sep $val $cfg 
     116 
     117    cfg=/etc/aliases 
     118    if ! exists $cfg; then warning $cfg not found; return; fi 
     119    key="root" 
     120    sep=":" 
     121    val=" free@64studio.com" 
     122    add_key "$key" "$sep" "$cfg" 
     123    set_key "$key" "$sep" "$val" "$cfg" 
    113124 
    114125    cfg=/etc/postfix/master.cf 
     
    376387    if ! exists $cfg; then warning $cfg not found; return; fi 
    377388    add_key "include" " " $cfg 
    378     set_key "include" " " "/usr/share/cdd-utils/monit/*" $cfg 
     389    set_key "include" " " "/etc/monit/ares" $cfg 
     390 
     391    cfg=/etc/monit/ares 
     392    sed -e "s/%HOST%/$(cat /etc/hostname)/g" /usr/share/cdd-utils/monit/global > $cfg 
     393    cat /usr/share/cdd-utils/monit/ldap >> $cfg 
    379394} 
    380395 
  • cdd-utils/trunk/share/monit/global

    r545 r546  
    1 set alert root 
     1set alert root@%HOST% 
    22set logfile syslog facility log_daemon 
    3 set mail-format { from: monit } 
     3set mail-format { from: monit@%HOST% }