码迷,mamicode.com
首页 > 其他好文 > 详细

lab-bill-sys-killservers-davidey

时间:2014-07-17 09:13:37      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:lab-bill-sys-killservers-davidey

#!/bin/sh

services="bluetooth cups firstboot gpmhidd hplip ip6tables isdn pcscd xfs xinetd yum-updatesd messagebus abrtd

 

abrt-oops abrt-ccpp avahi-daemonrhsmcertd"

 

for service in $services

do

  if[ -f "/etc/init.d/$service" ]

   then

   if [ $service == ‘xinetd‘ ]

     then

     grep -r disable /etc/xinetd.*  |sed ‘s/.*://‘ | grep -v ^#  | sed  ‘s/\s//g‘ | grep -q -v "disable=yes"

     if [ $? == 0 ]

       then

       echo "xinetd in Using."

     else

       /etc/init.d/xinetd stop && echo "xinetd stop success."

       chkconfig xinetd off && echo "xinetd stop on powered upsuccess." || echo "xinetd stop on powered up

 

failed."

     fi

   else

     /etc/init.d/$service stop && echo "$service stopsuccess."

     chkconfig $service off && echo "$service stop on powered upsuccess." || echo "$service stop on powered up

 

failed."

   fi

 else

   echo "$service not existed."

  fi

done

 

很晚完成该文档,尽管每一天工作强度很大,还是愿意与大家一起进步。呵呵每天进步一点。

 

后续介绍其他模块,有什么问题敬请大家不要吝啬指出,一同改进。欢迎大家和大家的技术发烧友一起加入我们的qq262407268,共建我们的《云络智慧城市》


本文出自 “DavideyLee” 博客,请务必保留此出处http://davideylee.blog.51cto.com/8703117/1439226

lab-bill-sys-killservers-davidey,布布扣,bubuko.com

lab-bill-sys-killservers-davidey

标签:lab-bill-sys-killservers-davidey

原文地址:http://davideylee.blog.51cto.com/8703117/1439226

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!