Fixed more typos :(
This commit is contained in:
parent
03719ecb94
commit
7e0de0e5c0
|
@ -4,10 +4,10 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance
|
||||||
AUTHOR="(L) 2013-2015 by Orsiris \"Ozy\" de Jong"
|
AUTHOR="(L) 2013-2015 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=1.1-pre
|
PROGRAM_VERSION=1.1-pre
|
||||||
PROGRAM_BUILD=2015112805
|
PROGRAM_BUILD=2015121501
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
FUNC_BUILD=2015121502
|
FUNC_BUILD=2015121503
|
||||||
## BEGIN Generic functions for osync & obackup written in 2013-2015 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
## BEGIN Generic functions for osync & obackup written in 2013-2015 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
||||||
|
|
||||||
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
||||||
|
@ -278,9 +278,9 @@ function SendAlert {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if type mail > /dev/null 2>&1 ; then
|
if type mail > /dev/null 2>&1 ; then
|
||||||
if $(type -p mail) -V | grep "GNU" > /dev/null; then echo ok; fi
|
if $(type -p mail) -V | grep "GNU" > /dev/null; then
|
||||||
attachment_command="-A $ALERT_LOG_FILE"
|
attachment_command="-A $ALERT_LOG_FILE"
|
||||||
elif $(type -p mail) -V; then
|
elif $(type -p mail) -V > /dev/null; then
|
||||||
attachment_command="-a $ALERT_LOG_FILE"
|
attachment_command="-a $ALERT_LOG_FILE"
|
||||||
else
|
else
|
||||||
attachment_command=""
|
attachment_command=""
|
||||||
|
@ -923,11 +923,23 @@ function TrapStop {
|
||||||
function TrapQuit {
|
function TrapQuit {
|
||||||
if [ $ERROR_ALERT -ne 0 ]; then
|
if [ $ERROR_ALERT -ne 0 ]; then
|
||||||
UnlockReplicas
|
UnlockReplicas
|
||||||
|
if [ "$_DEBUG" != "yes" ]
|
||||||
|
then
|
||||||
|
SendAlert
|
||||||
|
else
|
||||||
|
Log "Debug mode, no alert mail will be sent."
|
||||||
|
fi
|
||||||
CleanUp
|
CleanUp
|
||||||
Logger "$PROGRAM finished with errors." "ERROR"
|
Logger "$PROGRAM finished with errors." "ERROR"
|
||||||
exitcode=1
|
exitcode=1
|
||||||
elif [ $WARN_ALERT -ne 0 ]; then
|
elif [ $WARN_ALERT -ne 0 ]; then
|
||||||
UnlockReplicas
|
UnlockReplicas
|
||||||
|
if [ "$_DEBUG" != "yes" ]
|
||||||
|
then
|
||||||
|
SendAlert
|
||||||
|
else
|
||||||
|
Log "Debug mode, no alert mail will be sent."
|
||||||
|
fi
|
||||||
CleanUp
|
CleanUp
|
||||||
Logger "$PROGRAM finished with warnings." "WARN"
|
Logger "$PROGRAM finished with warnings." "WARN"
|
||||||
else
|
else
|
||||||
|
|
|
@ -4,7 +4,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance
|
||||||
AUTHOR="(L) 2013-2015 by Orsiris \"Ozy\" de Jong"
|
AUTHOR="(L) 2013-2015 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=1.1-pre
|
PROGRAM_VERSION=1.1-pre
|
||||||
PROGRAM_BUILD=2015112805
|
PROGRAM_BUILD=2015121501
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
source "./ofunctions.sh"
|
source "./ofunctions.sh"
|
||||||
|
@ -30,11 +30,23 @@ function TrapStop {
|
||||||
function TrapQuit {
|
function TrapQuit {
|
||||||
if [ $ERROR_ALERT -ne 0 ]; then
|
if [ $ERROR_ALERT -ne 0 ]; then
|
||||||
UnlockReplicas
|
UnlockReplicas
|
||||||
|
if [ "$_DEBUG" != "yes" ]
|
||||||
|
then
|
||||||
|
SendAlert
|
||||||
|
else
|
||||||
|
Log "Debug mode, no alert mail will be sent."
|
||||||
|
fi
|
||||||
CleanUp
|
CleanUp
|
||||||
Logger "$PROGRAM finished with errors." "ERROR"
|
Logger "$PROGRAM finished with errors." "ERROR"
|
||||||
exitcode=1
|
exitcode=1
|
||||||
elif [ $WARN_ALERT -ne 0 ]; then
|
elif [ $WARN_ALERT -ne 0 ]; then
|
||||||
UnlockReplicas
|
UnlockReplicas
|
||||||
|
if [ "$_DEBUG" != "yes" ]
|
||||||
|
then
|
||||||
|
SendAlert
|
||||||
|
else
|
||||||
|
Log "Debug mode, no alert mail will be sent."
|
||||||
|
fi
|
||||||
CleanUp
|
CleanUp
|
||||||
Logger "$PROGRAM finished with warnings." "WARN"
|
Logger "$PROGRAM finished with warnings." "WARN"
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FUNC_BUILD=2015121502
|
FUNC_BUILD=2015121503
|
||||||
## BEGIN Generic functions for osync & obackup written in 2013-2015 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
## BEGIN Generic functions for osync & obackup written in 2013-2015 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
||||||
|
|
||||||
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
||||||
|
@ -269,9 +269,9 @@ function SendAlert {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if type mail > /dev/null 2>&1 ; then
|
if type mail > /dev/null 2>&1 ; then
|
||||||
if $(type -p mail) -V | grep "GNU" > /dev/null; then echo ok; fi
|
if $(type -p mail) -V | grep "GNU" > /dev/null; then
|
||||||
attachment_command="-A $ALERT_LOG_FILE"
|
attachment_command="-A $ALERT_LOG_FILE"
|
||||||
elif $(type -p mail) -V; then
|
elif $(type -p mail) -V > /dev/null; then
|
||||||
attachment_command="-a $ALERT_LOG_FILE"
|
attachment_command="-a $ALERT_LOG_FILE"
|
||||||
else
|
else
|
||||||
attachment_command=""
|
attachment_command=""
|
||||||
|
|
20
osync.sh
20
osync.sh
|
@ -4,10 +4,10 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance
|
||||||
AUTHOR="(L) 2013-2015 by Orsiris \"Ozy\" de Jong"
|
AUTHOR="(L) 2013-2015 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=1.1-pre
|
PROGRAM_VERSION=1.1-pre
|
||||||
PROGRAM_BUILD=2015112805
|
PROGRAM_BUILD=2015121501
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
FUNC_BUILD=2015121502
|
FUNC_BUILD=2015121503
|
||||||
## BEGIN Generic functions for osync & obackup written in 2013-2015 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
## BEGIN Generic functions for osync & obackup written in 2013-2015 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
||||||
|
|
||||||
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
||||||
|
@ -266,9 +266,9 @@ function SendAlert {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if type mail > /dev/null 2>&1 ; then
|
if type mail > /dev/null 2>&1 ; then
|
||||||
if $(type -p mail) -V | grep "GNU" > /dev/null; then echo ok; fi
|
if $(type -p mail) -V | grep "GNU" > /dev/null; then
|
||||||
attachment_command="-A $ALERT_LOG_FILE"
|
attachment_command="-A $ALERT_LOG_FILE"
|
||||||
elif $(type -p mail) -V; then
|
elif $(type -p mail) -V > /dev/null; then
|
||||||
attachment_command="-a $ALERT_LOG_FILE"
|
attachment_command="-a $ALERT_LOG_FILE"
|
||||||
else
|
else
|
||||||
attachment_command=""
|
attachment_command=""
|
||||||
|
@ -822,11 +822,23 @@ function TrapStop {
|
||||||
function TrapQuit {
|
function TrapQuit {
|
||||||
if [ $ERROR_ALERT -ne 0 ]; then
|
if [ $ERROR_ALERT -ne 0 ]; then
|
||||||
UnlockReplicas
|
UnlockReplicas
|
||||||
|
if [ "$_DEBUG" != "yes" ]
|
||||||
|
then
|
||||||
|
SendAlert
|
||||||
|
else
|
||||||
|
Log "Debug mode, no alert mail will be sent."
|
||||||
|
fi
|
||||||
CleanUp
|
CleanUp
|
||||||
Logger "$PROGRAM finished with errors." "ERROR"
|
Logger "$PROGRAM finished with errors." "ERROR"
|
||||||
exitcode=1
|
exitcode=1
|
||||||
elif [ $WARN_ALERT -ne 0 ]; then
|
elif [ $WARN_ALERT -ne 0 ]; then
|
||||||
UnlockReplicas
|
UnlockReplicas
|
||||||
|
if [ "$_DEBUG" != "yes" ]
|
||||||
|
then
|
||||||
|
SendAlert
|
||||||
|
else
|
||||||
|
Log "Debug mode, no alert mail will be sent."
|
||||||
|
fi
|
||||||
CleanUp
|
CleanUp
|
||||||
Logger "$PROGRAM finished with warnings." "WARN"
|
Logger "$PROGRAM finished with warnings." "WARN"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue