How to start rsync daemon at boot

Alan McKinnon alan at linuxholdings.co.za
Fri Jun 16 11:16:20 UTC 2006


On Friday 16 June 2006 10:05, Jeremiah Foster wrote:
> On Fri, 2006-06-16 at 04:36 +0100, GrumpySmurf wrote:
> > Edit /etc/init.d/rsync or  /etc/default/rsync and change the
> > following line:
>
> Is this the general, accepted way to do this on Ubuntu and
> debian-like systems? The UNIXy way was to move scripts in
> /etc/rc5.d/. For example one would have moved S80rsync to K20rsync
> and rsync would not have been booted when run level five was
> starting up programs. Has the procedure been modified for linux?
>
> If so that is sort of broken. Largely because not everyone provides
> an interface when they build their scripts. When one runs an
> arbitrary invoke-rc.d <script> you may or may not get a response.
>
> Isn't it better if we had a unified interface to manage scripts and
> not the hodge-podge of editing /etc/init.d/*, /etc/rc{0-6}.d/* and
> /etc/default/*?

The usual method on Linux is to create master scripts in /etc/init.d/ 
and then install symlinks to them in /etc/rc{0-6}.d/*

If the symlink is named S<something> then init starts the service when 
using the runlevel. If it is named K<something> then init stops the 
service when using the runlevel. So one doesn't edit the files 
in /etc/rc{0-6}.d/*, one simply creates and deletes symlinks as 
necessary. The edit called for earlier in the thread causes rsync to 
change it's startup behaviour and the change occurs in any runlevel 
that calls rsync.

It won't be possible to have a unified interface, as creating and 
maintaining these scripts is the ultimate responsibility of the 
distro vendor who can do anything they like with them. To keep things 
sane, most do stick with traditional SysVInit but this isn't a given.

-- 
If only me, you and dead people understand hex, 
how many people understand hex?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five




More information about the ubuntu-users mailing list