Fork me on GitHub

bill-ingram.com

Programming | Web Design | Photography

Removing a Service From All Run Levels on Ubuntu 10.04

If postgres is running, stop it

1
sudo /etc/init.d/postgresql-8.4 stop

Or do it the proper way

1
sudo service postgresql-8.4 stop

Remove it from rc.d

1
2
sudo update-rc.d postgresql-8.4 remove
update-rc.d: /etc/init.d/postgresql-8.4 exists during rc.d purge (use -f to force)

This time with force!

1
2
3
4
5
6
7
8
9
sudo update-rc.d -f postgresql-8.4 remove
Removing any system startup links for /etc/init.d/postgresql-8.4 ...
/etc/rc0.d/K19postgresql-8.4
/etc/rc1.d/K19postgresql-8.4
/etc/rc2.d/S19postgresql-8.4
/etc/rc3.d/S19postgresql-8.4
/etc/rc4.d/S19postgresql-8.4
/etc/rc5.d/S19postgresql-8.4
/etc/rc6.d/K19postgresql-8.4

That’s it.

Comments