Disable service startup in linux

My eTrayz NAS starts up with lots of services that I don’t need, like iTunes-server (mt-daapd), MiniDLNA, etc.
I put together this little script do easily check the current runlevel services and to disable them. Nothing spectacular but still 🙂

#!/bin/sh
chkconfig --list | grep "3:on"

echo "Enter service name:"
read service

echo "Removing $service"
chkconfig --del $service
for i in 1 2 3 4 5 6; do
chkconfig --level $i $service off
echo "Service $service in runlevel $i turned off."
done
chkconfig --list | grep -i $service

Leave a Reply

Your email address will not be published. Required fields are marked *