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 swap disable=yes'| grep-v ^ # | sed's /\ s Accord 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
Finish this document very late, although the work is very intense every day, I am willing to make progress with you. Hehe, make progress every day.
Follow-up introduction of other modules, if there are any problems, please do not stingy point out, improve together. Welcome everyone and your technology enthusiasts to join our qq Group 262407268 to build our "Yunluo Wisdom City".