#!/bin/bash ## mail 2016-07-22 ## http://www.aqzt.com ##email: ppabc@qq.com ##robert yu ##centos 7 ##定时更换/etc/mail.rc配置文件 ##0 */12 * * * /data/shell/mail.sh check=`cat /tmp/mail_check.log` if [ "$check" == "1" ];then cat >/etc/mail.rc< /tmp/mail_check.log fi if [ "$check" == "2" ];then cat >/etc/mail.rc< /tmp/mail_check.log fi date >> /tmp/mail_time.log