Various fixes
This commit is contained in:
parent
1df1505a11
commit
c3f5534c64
|
@ -24,6 +24,7 @@ UNDER WORK
|
||||||
RECENT CHANGES
|
RECENT CHANGES
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
- Added path detection for exclude list file
|
||||||
- Added a simple init script working for RHEL / CentOS and an install script
|
- Added a simple init script working for RHEL / CentOS and an install script
|
||||||
- Fixed an issue with MacOSX using rsync -E differently than other *nix (Thanks to Pierre Clement)
|
- Fixed an issue with MacOSX using rsync -E differently than other *nix (Thanks to Pierre Clement)
|
||||||
- Multislave asynchronous task support (Thanks to Ulrich Norbisrath)
|
- Multislave asynchronous task support (Thanks to Ulrich Norbisrath)
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
## Please adapt this to fit your distro needs
|
## Please adapt this to fit your distro needs
|
||||||
|
|
||||||
mkdir /etc/osync
|
mkdir /etc/osync
|
||||||
cp ./sync.conf /etc/osync
|
cp ./sync.conf /etc/osync/sync.conf.example
|
||||||
|
cp ./exclude.list.example /etc/osync
|
||||||
cp ./osync.sh /usr/local/bin
|
cp ./osync.sh /usr/local/bin
|
||||||
cp ./osync-srv /etc/init.d
|
cp ./osync-srv /etc/init.d
|
||||||
|
|
||||||
|
|
8
osync.sh
8
osync.sh
|
@ -4,7 +4,7 @@ PROGRAM="Osync" # Rsync based two way sync engine with fault tolerance
|
||||||
AUTHOR="(L) 2013-2014 by Orsiris \"Ozy\" de Jong"
|
AUTHOR="(L) 2013-2014 by Orsiris \"Ozy\" de Jong"
|
||||||
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
||||||
PROGRAM_VERSION=0.99preRC3
|
PROGRAM_VERSION=0.99preRC3
|
||||||
PROGRAM_BUILD=2105201401
|
PROGRAM_BUILD=2205201401
|
||||||
|
|
||||||
## allow debugging from command line with preceding ocsync with DEBUG=yes
|
## allow debugging from command line with preceding ocsync with DEBUG=yes
|
||||||
if [ ! "$DEBUG" == "yes" ]
|
if [ ! "$DEBUG" == "yes" ]
|
||||||
|
@ -744,6 +744,12 @@ function RsyncExcludeFrom
|
||||||
{
|
{
|
||||||
if [ ! $RSYNC_EXCLUDE_FROM == "" ] && [ -e $RSYNC_EXCLUDE_FROM ]
|
if [ ! $RSYNC_EXCLUDE_FROM == "" ] && [ -e $RSYNC_EXCLUDE_FROM ]
|
||||||
then
|
then
|
||||||
|
## Check if the exclude list has a full path, and if not, add the config file path if there is one
|
||||||
|
if [ "$(basename $RSYNC_EXCLUDE_FROM)" == "$RSYNC_EXCLUDE_FROM" ]
|
||||||
|
then
|
||||||
|
$RSYNC_EXCLUDE_FROM=$(dirname $cfgfile)/$RSYNC_EXCLUDE_FROM
|
||||||
|
fi
|
||||||
|
|
||||||
RSYNC_EXCLUDE="$RSYNC_EXCLUDE --exclude-from=\"$RSYNC_EXCLUDE_FROM\""
|
RSYNC_EXCLUDE="$RSYNC_EXCLUDE --exclude-from=\"$RSYNC_EXCLUDE_FROM\""
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
###### Osync - Rsync based two way sync engine with fault tolerance
|
###### Osync - Rsync based two way sync engine with fault tolerance
|
||||||
###### (L) 2013-2014 by Orsiris "Ozy" de Jong (www.netpower.fr)
|
###### (L) 2013-2014 by Orsiris "Ozy" de Jong (www.netpower.fr)
|
||||||
###### Config file rev 2105201401
|
###### Config file rev 2205201401
|
||||||
|
|
||||||
## ---------- GENERAL OPTIONS
|
## ---------- GENERAL OPTIONS
|
||||||
|
|
||||||
|
@ -26,8 +26,10 @@ LOGFILE=""
|
||||||
## Paths are relative to sync dirs. List elements are separated by a semicolon.
|
## Paths are relative to sync dirs. List elements are separated by a semicolon.
|
||||||
RSYNC_EXCLUDE_PATTERN="tmp;archives"
|
RSYNC_EXCLUDE_PATTERN="tmp;archives"
|
||||||
## File that contains the list of directories or files to exclude from sync on both sides. Leave this empty if you don't want to use an exclusion file.
|
## File that contains the list of directories or files to exclude from sync on both sides. Leave this empty if you don't want to use an exclusion file.
|
||||||
|
## This file has to be in the same directory as the config file
|
||||||
## Paths are relative to sync dirs. One element per line.
|
## Paths are relative to sync dirs. One element per line.
|
||||||
RSYNC_EXCLUDE_FROM="exclude.list"
|
RSYNC_EXCLUDE_FROM=""
|
||||||
|
#RSYNC_EXCLUDE_FROM="exclude.list"
|
||||||
## List elements separator char. You may set an alternative seperator char for your directories lists above.
|
## List elements separator char. You may set an alternative seperator char for your directories lists above.
|
||||||
PATH_SEPARATOR_CHAR=";"
|
PATH_SEPARATOR_CHAR=";"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue