Disabling/Enabling startup of a service in Ubuntu

-preparation-
get a cup of coffee and some snacks to accompany you :D

-goal-
wee can disabled and enabled startup service on ubuntu

-more info-

The procedure for disabling a service in Ubuntu is very simple: all you have to do is remove the symlinks from all the runlevel-specific directories, /etc/rc*.d, so that no links are pointing to the original /etc/init.d script for your service.

-for to do-
This example below shows how a service called "bind9" was disabled on my system:

-for disabled-
root@traficmng:/home/momod# update-rc.d -f bind9 remove
 Removing any system startup links for /etc/init.d/bind9 ...
   /etc/rc0.d/K20bind9
   /etc/rc1.d/K20bind9
   /etc/rc2.d/S20bind9
   /etc/rc3.d/S20bind9
   /etc/rc4.d/S20bind9
   /etc/rc5.d/S20bind9
   /etc/rc6.d/K20bind9

-for enabled-
root@traficmng:/home/momod# update-rc.d bind9 defaults
 Adding system startup for /etc/init.d/bind9 ...
   /etc/rc0.d/K20bind9 -> ../init.d/bind9
   /etc/rc1.d/K20bind9 -> ../init.d/bind9
   /etc/rc6.d/K20bind9 -> ../init.d/bind9
   /etc/rc2.d/S20bind9 -> ../init.d/bind9
   /etc/rc3.d/S20bind9 -> ../init.d/bind9
   /etc/rc4.d/S20bind9 -> ../init.d/bind9
   /etc/rc5.d/S20bind9 -> ../init.d/bind9

-testing n checking-
just tray on your computer/server for more practice and testing .. :D

-nb-
tested by me... ^_^
Previous
Next Post »

comment please ... ConversionConversion EmoticonEmoticon

Thanks for your comment