vi /etc/xinetd.d/rsync
# default: off
# description: The rsync server is a good addition to an ftp server, as it \
# allows crc checksumming etc.
service rsync
{
disable = no
flags = IPv6
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
Øndra disable till no
/etc/services: rsync 873/tcp
/etc/inetd.conf
rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon
Gör en fil /etc/rc.d/init.d/rsyncd:
#!/bin/sh
# Rsyncd This shell script takes care of starting and stopping the rsync daemon
# description: Rsync is an awesome replication tool.
# Source function library.
. /etc/rc.d/init.d/functions
[ -f /usr/bin/rsync ] || exit 0
case "$1" in
start)
action "Starting rsyncd: " /usr/bin/rsync --daemon
;;
stop)
action "Stopping rsyncd: " killall rsync
;;
*)
echo "Usage: rsyncd {start|stop}"
exit 1
esac
exit 0
Länkan filen med
cd /etc/rc.d/rc3.d
ln -s ../init.d/rsyncd S93rsyncd
cd /etc/rc.d/rc5.d
ln -s ../init.d/rsyncd S93rsyncd
chmod 755 /etc/rc.d/init.d/rsyncd
|