# rsync-serverif!grep'^\[pub\]'/etc/rsyncd.conf;then
cat>>/etc/rsyncd.conf<<EOF
# altnode auto configuration[pub]
path=/var/ftp/pub
#use chrootreadonly
list
EOF
chkconfigrsyncon
fi
if!grep'^\[altnode\]'/etc/rsyncd.conf;then
cat>>/etc/rsyncd.conf<<EOF
# altnode auto configuration[altnode]
path=/var/ftp/altnode
usechroot
readonly
list
EOF
chkconfigrsyncon
fi
ifgrep'only_from = 127.0.0.1'/etc/xinetd.conf;then
sed-i-e's,only_from = .*,only_from = 0.0.0.0,'/etc/xinetd.conf
fi
servicexinetdrestart
# postfixif!grep'^relayhost'/etc/postfix/main.cf;then
cat>>/etc/postfix/main.cf<<EOF
# altnode auto configurationrelayhost=[relay.mskdc.altlinux.org]
EOF
chkconfigpostfixon||:
servicepostfixrestart||:
fi
if!grep'^myhostname'/etc/postfix/main.cf;then
echo"WARNING: myhostname not found in /etc/postfix/main.cf"else
mailfqdn=`grep'^myhostname'/etc/postfix/main.cf|awk'{print $3}'`
if[x$mailfqdn!=x`hostname`];then
echo"WARNING: myhostname in /etc/postfix/main.cf does not match hostname"fi
fi
servicemonitrestart||: