千家信息网

lab-bill-sys-killservers-davidey

发表于:2025-01-18 作者:千家信息网编辑
千家信息网最后更新 2025年01月18日,#!/bin/shservices="bluetooth cups firstboot gpmhidd hplip ip6tables isdn pcscd xfs xinetd yum-update
千家信息网最后更新 2025年01月18日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,共建我们的《云络智慧城市》


0