|
|
@ -3,7 +3,7 @@
|
|
|
|
PROGRAM="Osync-batch" # Batch program to run osync instances sequentially and rerun failed ones
|
|
|
|
PROGRAM="Osync-batch" # Batch program to run osync instances sequentially and rerun failed ones
|
|
|
|
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_BUILD=0104201501
|
|
|
|
PROGRAM_BUILD=0104201502
|
|
|
|
|
|
|
|
|
|
|
|
## Runs an osync instance for every conf file found
|
|
|
|
## Runs an osync instance for every conf file found
|
|
|
|
## If an instance fails, run it again if time permits
|
|
|
|
## If an instance fails, run it again if time permits
|
|
|
@ -21,9 +21,7 @@ MAX_RERUNS=3
|
|
|
|
## Osync executable full path can be set here if it cannot be found on the system
|
|
|
|
## Osync executable full path can be set here if it cannot be found on the system
|
|
|
|
if ! type -p osync.sh > /dev/null 2>&1
|
|
|
|
if ! type -p osync.sh > /dev/null 2>&1
|
|
|
|
then
|
|
|
|
then
|
|
|
|
OSYNC_EXECUTABLE=osync.sh
|
|
|
|
OSYNC_EXECUTABLE=./osync.sh
|
|
|
|
else
|
|
|
|
|
|
|
|
OSYNC_EXECUTABLE=$(type -p osync.sh)
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
## Log file path
|
|
|
|
## Log file path
|
|
|
@ -67,7 +65,7 @@ function Batch
|
|
|
|
Log "Osync instances will be run for: $RUN"
|
|
|
|
Log "Osync instances will be run for: $RUN"
|
|
|
|
for i in $RUN
|
|
|
|
for i in $RUN
|
|
|
|
do
|
|
|
|
do
|
|
|
|
$OSYNC_EXECUTABLE "$i" "$opts"
|
|
|
|
$OSYNC_EXECUTABLE "$i" $opts
|
|
|
|
if [ $? != 0 ]
|
|
|
|
if [ $? != 0 ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
Log "Run instance $(basename $i) failed"
|
|
|
|
Log "Run instance $(basename $i) failed"
|
|
|
|