services, chkconfig

Debiani foorum

Moderaator: Moderaatorid

Vasta
illukas
Vana Pingviin
Vana Pingviin
Postitusi: 2036
Liitunud: 24.10.2006, 21:35

services, chkconfig

Postitus Postitas illukas »

ehk trustixist ja redhatist on sellised asjad meelde jäänud ja korralikult selgeks saadud.
Katsetasin debiani ja ei ole selliseid asju, oskab keegi öelda kas neid üldse olemas on või mis paketis need on. Ei taha päris käsitsi hakata inetd-ist ää kustutama- teinekord vaja
Kasutaja avatar
obundra
Vana Pingviin
Vana Pingviin
Postitusi: 1213
Liitunud: 04.08.2005, 03:00

Postitus Postitas obundra »

Debianis õiendab initskriptide käivitusega invoke-rc.d ja nende runlevelitele sättimisega update-rc.d.
Kasutaja avatar
johnsmith
Vana Pingviin
Vana Pingviin
Postitusi: 714
Liitunud: 24.07.2006, 23:33

Postitus Postitas johnsmith »

Linke käivitus skriptidele ei pea ära kustutama.
Piisab "mv S95teenus K95teenus" või "mv S95teenus .S95teenus".
Pärast kui jälle vaja on muudad tagasi.

Või mõtlesid ikkagi inetd teenuseid, sellisel juhul võib ju teha inetd.conf -ist koopia ja kustutada vastavad read sealt ära või paned eelnevat meetodit kasutades kogu inetd seisma.
"Thinking is the hardest work there is, which is probably the reason why so few engage in it" - Henry Ford
Kasutaja avatar
DaStoned
Pingviini aktivist
Pingviini aktivist
Postitusi: 395
Liitunud: 11.01.2007, 16:23

Postitus Postitas DaStoned »

Jah, update-rc.d on see millega teenuseid "ametlikult" kolkida tuleb. Aga üldiselt tundub see minu jaoks nii kuradi keeruline, et ma tavaliselt ma teen seda käsitsi. Näiteks võtan skriptil käivitusõigused maha või midagi sinnakanti.
When the shit hits the fan, keep your mouth shut!
Kasutaja avatar
obundra
Vana Pingviin
Vana Pingviin
Postitusi: 1213
Liitunud: 04.08.2005, 03:00

Postitus Postitas obundra »

Sama siin.Ja invoke-rc.d kasutamise asemel lasen vajaliku teenuse käsitsi /etc/init.d kataloomast käima, lihtsalt harjunud niimoodi käe sisse.
illukas
Vana Pingviin
Vana Pingviin
Postitusi: 2036
Liitunud: 24.10.2006, 21:35

Postitus Postitas illukas »

http://linuxhelp.blogspot.com/2006/04/e ... ng_01.html


Debian Method

Debian Linux has its own script to enable and disable services across runlevels. It is called update-rc.d. Going by the above example, you can enable apache webserver as follows:

# update-rc.d apache2 defaults

... this will enable the apache webserver to start in the default run levels of 2,3,4 and 5. Of course, you can do it explicitly by giving the run levels instead of the "defaults" keyword as follows:

# update-rc.d apache2 start 20 2 3 4 5 . stop 80 0 1 6 .

The above command modifies the sym-links in the respective /etc/rcX.d directories to start or stop the service in the destined runlevels. Here X stands for a value of 0 to 6 depending on the runlevel. One thing to note here is the dot (.) which is used to terminate the set which is important. Also 20 and 80 are the sequence codes which decides in what order of precedence the scripts in the /etc/init.d/ directory should be started or stopped.

And to disable the service in all the run levels, you execute the command:

# update-rc.d -f apache2 remove

Here -f option which stands for force is mandatory.

But if you want to enable the service only in runlevel 5, you do this instead:

# update-rc.d apache2 start 20 5 . stop 80 0 1 2 3 4 6 .
Vasta