Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Lab-bill-sys-killservers-davidey

Shulou Source: shulou.com Published: 2022-06-01 05:35:34 10月03日 Update

#! / 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".

Tags: Progress stingy big join us city intensity technology wisdom module or problem enthusiast work Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Tech Info macOS MySQL OPPO Reno