This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes How to stop automatically running services? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "How to stop automatically running services?" Watch "How to stop automatically running services?" New topic
Author

How to stop automatically running services?

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

Hi.
I have some services running automatically on Ubuntu 7.10 and in my case it is PostgreSQL database.
In general, how to forbid services from running automatically in Ubuntu?
Thanks.
Anand Hariharan
Rancher

Joined: Aug 22, 2006
Posts: 257

Tweak scripts located at /etc/rcn.d

For a service such as postgresql, n = 3.


"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupery
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

For Ubuntu, it is most probably Runlevel 2, and /etc/rc2.d/S??postgresql-* .


http://home.arcor.de/hirnstrom/bewerbung
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15959
    
  19

The entries in the rc.n directories are aliases (softlinks) to the master scripts. You want to remove both the SnnServicename and the KnnServicename from all the numbered runlevel directories.

In Red Hat/Feodora, there's a magic comment in the initscript that specifies run level information (it's also done in SuSe, but slightly differently). You can turn services on and off via a gui command or via the chkconfig utility, like so:

chkconfig --level 345 postgresql off

Occasionally, Ubuntu adopts Red Hat stuff, so you might want to see if that works.


Customer surveys are for companies who didn't pay proper attention to begin with.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Ah yes - there is a helper-tool

with a different version number probably in your case.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to stop automatically running services?
 
Similar Threads
Debugging a Connection Pool In services??
Linux Ubuntu Multi-boot
list of services deployed and running in server
unable to find valid certification path to requested target
Accessing File on UNIX