# Defining List of unwanted services
SERVICES="rhnsd sendmail cups netfs autofs nfslock mdmonitor isdn cpuspeed rpcidmapd rpcgssd iptables xfs pcmcia smartd"
# Finding each service status
for service in $SERVICES; do
if [ -f /etc/init.d/$service ]; then
# Turning off the service
chkconfig $service off
if_running=`service $service status | egrep -i running`
# Stopping the service if it is running
[ ! -z "$if_running" ] && service $service stop
fi
done
SERVICES="rhnsd sendmail cups netfs autofs nfslock mdmonitor isdn cpuspeed rpcidmapd rpcgssd iptables xfs pcmcia smartd"
# Finding each service status
for service in $SERVICES; do
if [ -f /etc/init.d/$service ]; then
# Turning off the service
chkconfig $service off
if_running=`service $service status | egrep -i running`
# Stopping the service if it is running
[ ! -z "$if_running" ] && service $service stop
fi
done
No comments:
Post a Comment