shell if 写法
echo "查看syslog日志审计服务是否开启:"
if service rsyslog status | egrep " active \(running";then
echo ">>>经分析,syslog服务已开启"
else
echo ">>>经分析,syslog服务未开启,建议通过service rsyslog start开启日志审计功能---------[需调整]"
fi
echo "查看syslog日志审计服务是否开启:"
if service rsyslog status | egrep " active \(running";then
echo ">>>经分析,syslog服务已开启"
else
echo ">>>经分析,syslog服务未开启,建议通过service rsyslog start开启日志审计功能---------[需调整]"
fi