Skip to content

Instantly share code, notes, and snippets.

View doudou's full-sized avatar

Sylvain Joyeux doudou

View GitHub Profile
@doudou
doudou / disable_debian_services_permanently.sh
Created May 11, 2009 08:13
this script disables a list of services. Put it in /etc/rc.local. This is needed because debian reenables services at each package upgrade.
cat /etc/disabled_services | while read pkgname; do
level=$(runlevel | awk '{print $2}')
if test -f /etc/rc$level.d/S??$pkgname; then
echo "disabling service $pkgname"
/etc/init.d/$pkgname stop
update-rc.d -f $pkgname remove
fi
done