#!/bin/bash
#"if...else" usage
#FileName test.apache
#Using this program to show your system's services.
echo "Now,the web services of this Linux system will be detect..."
echo
#Detect www service
web=`/usr/bin/pgrep httpd`
if [ "$web" != "" ]
then
echo "The web service is running."
else
echo "The web service is NOT running."
/etc/rc.d/init.d/httpd start
fi
2016-11-16
测试web服务器是否停止
评论
发表评论
姓 名: