mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-11-10 15:20:58 +00:00
Revert "minni cleanups."
This reverts commit a83f5dcfba72d787f11bc3518ec0e48f54351ce9.
This commit is contained in:
parent
7a517789db
commit
4820dbbc49
@ -6,9 +6,9 @@
|
|||||||
# This script will be called by lsyncd whenever it wants to sync something.
|
# This script will be called by lsyncd whenever it wants to sync something.
|
||||||
# It is supposed to be configured or even completly exchanged by you, to fit your needs.
|
# It is supposed to be configured or even completly exchanged by you, to fit your needs.
|
||||||
#
|
#
|
||||||
# First parameter is "startup" in case lsyncd startups, "change" in normal operations.
|
# First parameter is "startup" in case lsyncd startups, "change" in normal operation.
|
||||||
# Second parameter is rsync source
|
# Second parameter is rsync source
|
||||||
# Third parameter is rsync destination.
|
# Third parameter is rsync destition.
|
||||||
#
|
#
|
||||||
# When this script returns a non-zero error code, lsyncd will either die
|
# When this script returns a non-zero error code, lsyncd will either die
|
||||||
# or in the current implementation call it again with the parant directory if not in startup mode.
|
# or in the current implementation call it again with the parant directory if not in startup mode.
|
||||||
@ -18,7 +18,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
###
|
###
|
||||||
# You can add additional options you want to call rsync with here.
|
# You can add additional options you want to call rsync here.
|
||||||
#
|
#
|
||||||
RSYNC_OPTIONS="--delete -lt";
|
RSYNC_OPTIONS="--delete -lt";
|
||||||
|
|
||||||
@ -40,6 +40,7 @@ fi
|
|||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
EXITVAL=0
|
EXITVAL=0
|
||||||
|
echo /usr/bin/rsync $RSYNC_OPTIONS$SCOPE $EXCLUDE_FILE $2 $3 || EXITVAL=$?
|
||||||
/usr/bin/rsync $RSYNC_OPTIONS$SCOPE $EXCLUDE_FILE $2 $3 || EXITVAL=$?
|
/usr/bin/rsync $RSYNC_OPTIONS$SCOPE $EXCLUDE_FILE $2 $3 || EXITVAL=$?
|
||||||
case $EXITVAL in
|
case $EXITVAL in
|
||||||
0) # everything okay
|
0) # everything okay
|
||||||
@ -54,6 +55,6 @@ while true; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
###
|
###
|
||||||
# If you want to add some actions to be performed after rsync you can do here.
|
# If you want to add some actions to be performed after rsync you can do here...
|
||||||
#
|
#
|
||||||
|
|
||||||
|
6
lsyncd.c
6
lsyncd.c
@ -383,6 +383,12 @@ bool action(int reason, char * src, char * dest)
|
|||||||
dest,
|
dest,
|
||||||
NULL};
|
NULL};
|
||||||
|
|
||||||
|
//argv[argc++] = s_strdup("--delete");
|
||||||
|
//if (exclude_file) {
|
||||||
|
// argv[argc++] = s_strdup("--exclude-from");
|
||||||
|
// argv[argc++] = s_strdup(exclude_file);
|
||||||
|
//}
|
||||||
|
|
||||||
if (flag_dryrun) {
|
if (flag_dryrun) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user