[-]
[+]
|
Added |
lsyncd.changes
|
|
[-]
[+]
|
Changed |
lsyncd.spec
^
|
|
|
Renamed |
lsyncd-2.0.6.tar.bz2
^
|
[-]
[+]
|
Added |
lsyncd-suse.init
^
|
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+### BEGIN INIT INFO
+# Provides:lsyncd
+# Required-Start:
+# Required-Stop:
+# Default-Start:3 5
+# Default-Stop:0 1 2 6
+# Short-Description:Start lsyncd
+# Description:Lsyncd uses rsync to synchronize local directories with a remote machine running rsyncd.
+### END INIT INFO
+
+config="/etc/lsyncd/lsyncd.conf"
+lsyncd="/usr/bin/lsyncd"
+prog="lsyncd"
+
+. /etc/rc.status
+
+[ -f /etc/sysconfig/lsyncd ] && . /etc/sysconfig/lsyncd
+
+rc_reset
+
+case "$1" in
+ start)
+ echo -n "Starting $prog: "
+ $lsyncd -log Exec $config ${OPTIONS}
+ rc_status -v
+ ;;
+ stop)
+ echo -n "Shutting down $prog: "
+ /bin/kill -9 `/sbin/pidof lsyncd`
+ until [ -z $(/sbin/pidof lsyncd) ]; do :; done
+ rc_status -v
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ rc_status
+ ;;
+ status)
+ echo -n "$prog status:"
+ rc_status -v
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+ ;;
+esac
+
+rc_exit
|
[-]
[+]
|
Added |
lsyncd.conf
^
|
@@ -0,0 +1,17 @@
+settings = {
+ statusFile = "/var/log/lsyncd/lsyncd.status",
+ nodaemon = false,
+ statusInterval = 5,
+ maxDelays = 10,
+ maxProcesses = 10,
+}
+
+--##Rsyslog
+sync{
+ default.rsyncssh,
+ host="user@server",
+ source="/etc/rsyslog.d",
+ targetdir="/etc/rsyslog.d",
+ rsyncBinary="/etc/lsyncd/rsync_sudo.sh",
+ rsyncOpts={"-rltusogp"}
+}
|
[-]
[+]
|
Changed |
lsyncd.init
^
|
@@ -19,8 +19,8 @@
OPTIONS="-pidfile /var/run/lsyncd.pid /etc/lsyncd.conf"
-if [ -e /etc/sysconfig/lsyncd.options ]; then
- . /etc/sysconfig/lsyncd.options
+if [ -e /etc/sysconfig/lsyncd ]; then
+ . /etc/sysconfig/lsyncd
fi
RETVAL=0
|
[-]
[+]
|
Added |
rsync_sudo.sh
^
|
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/bin/rsync --rsync-path="sudo /usr/bin/rsync" $@
|