Hi
I have a script from which i want to disable unwanted services. I wanted to have the list of unwanted services in the same script file. I tried the following, but it is not working...How do I mention list of services in the same file and still make the script work ?
Code:
#/bin/bash
#List of services, modify list between SERVICES tag
service_list=$(cat <<SERVICES
acpid
apmd
avahi-daemon
avahi-dnsconfd
bluetooth
conman
cups
dnsmasq
dund
gpm
hidd
ip6tables
irda
netconsole
netfs
NetworkManager
SERVICES)
for service in `echo $service_list`;
do
echo "Disabling service $service";
/etc/rc.d/init.d/$service stop;
echo " ";
done;
When I run, it doesn't work