#! /Bin/sh
Services = "Bluetooth cups firstboot gpmhidd maid IP 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
This document is completed very late. Despite the great intensity of work every day, I am willing to make progress with you. Every day, make better progress.
We will introduce other modules in the future. If you have any questions, please do not point them out and make improvements together. You are welcome to join our QQ Group 262407268 with our technical enthusiasts to build our "smart city of cloud networking".
This article is from the "davideylee" blog, please be sure to keep this source http://davideylee.blog.51cto.com/8703117/1439226