Koozali.org: home of the SME Server

Starting Rsync Daemon automatically

Offline 14

  • 10
  • +0/-0
Starting Rsync Daemon automatically
« on: August 24, 2008, 12:17:08 PM »
I need to setup SME server as a  RSYNC host

I can start it manually with

rsync --daemon --port=873 --config=/etc/rsyncd.conf



Offline arne

  • ****
  • 1,116
  • +0/-4
Re: Starting Rsync Daemon automatically
« Reply #1 on: August 24, 2008, 02:23:00 PM »
I think cron jobs will work on the SME server like on any other Linux distros. (At least I have had cronjobs running for some years withouth a problem.)

As an excample, edit your command on a text file and copy it into the directory /etc/cron.hourly/ and the command will be done one time per hour.

By the way, I can not remember for sure if I have done this with the rsync command, but I think it will work.

CORRECTION:

I thought it was a question og doing something again and again, but it was just to start one service ..

This can be done via editing the file /etc/rc.d/rc.local and the job will be done only one time at startup.

Don't know if there will need for some firewall "adjustments" from the shell .. (Depending of how it will be used.)
« Last Edit: August 24, 2008, 02:28:56 PM by arne »
......

Offline m

  • ****
  • 276
  • +0/-0
  • Peet
Re: Starting Rsync Daemon automatically
« Reply #2 on: August 24, 2008, 02:31:40 PM »
You can either put the command into the /etc/rc.d/rc.local script,
or create a /etc/rc.d/init.d/rsyncd script and symlink it to /etc/rc.d/rc7.d/S90rsyncd
Google for "rsync init script" to find various samples