Merge pull request #14 from onovy/same-master-slave

Check if master and slave dirs are not same.
This commit is contained in:
Orsiris de Jong 2015-03-30 01:10:47 +02:00
commit feef7f5b66
1 changed files with 9 additions and 0 deletions

View File

@ -635,6 +635,15 @@ function CreateOsyncDirs
function CheckMasterSlaveDirs
{
MASTER_SYNC_DIR_CANN=$(readlink -f "$MASTER_SYNC_DIR")
SLAVE_SYNC_DIR_CANN=$(readlink -f "$SLAVE_SYNC_DIR")
if [ "$MASTER_SYNC_DIR_CANN" == "$SLAVE_SYNC_DIR_CANN" ]
then
LogError "Master directory [$MASTER_SYNC_DIR] can't be same as slave directory."
exit 1
fi
if ! [ -d "$MASTER_SYNC_DIR" ]
then
if [ "$CREATE_DIRS" == "yes" ]