mirror of
https://github.com/deajan/obackup.git
synced 2025-01-12 23:23:53 +01:00
Fixed bogus debug line in Killchilds
This commit is contained in:
parent
e0e3804e27
commit
f5dfc478a2
@ -8,7 +8,7 @@ PROGRAM_VERSION=2.0-pre
|
|||||||
PROGRAM_BUILD=2016040603
|
PROGRAM_BUILD=2016040603
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
## FUNC_BUILD=2016040802
|
## FUNC_BUILD=2016041001
|
||||||
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
## BEGIN Generic functions for osync & obackup written in 2013-2016 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
|
||||||
@ -157,14 +157,14 @@ function KillChilds {
|
|||||||
|
|
||||||
if children="$(pgrep -P "$pid")"; then
|
if children="$(pgrep -P "$pid")"; then
|
||||||
for child in $children; do
|
for child in $children; do
|
||||||
|
Logger "Launching KillChilds \"$child\" true" "DEBUG"
|
||||||
KillChilds "$child" true
|
KillChilds "$child" true
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Try to kill nicely, if not, wait 15 seconds to let Trap actions happen before killing
|
# Try to kill nicely, if not, wait 15 seconds to let Trap actions happen before killing
|
||||||
if [ "$self" == true ]; then
|
if [ "$self" == true ]; then
|
||||||
if [ "$_DEBUG" == "yes" ]; then
|
Logger "Killing process $pid" "DEBUG"
|
||||||
Logger "Killing process $pid" "NOTICE"
|
|
||||||
kill -s SIGTERM "$pid"
|
kill -s SIGTERM "$pid"
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
sleep 15 && kill -9 "$pid" &
|
sleep 15 && kill -9 "$pid" &
|
||||||
@ -173,7 +173,6 @@ function KillChilds {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
# sleep 15 needs to wait before killing itself
|
# sleep 15 needs to wait before killing itself
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
## FUNC_BUILD=2016040802
|
## FUNC_BUILD=2016041001
|
||||||
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
## BEGIN Generic functions for osync & obackup written in 2013-2016 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
|
||||||
@ -147,14 +147,14 @@ function KillChilds {
|
|||||||
|
|
||||||
if children="$(pgrep -P "$pid")"; then
|
if children="$(pgrep -P "$pid")"; then
|
||||||
for child in $children; do
|
for child in $children; do
|
||||||
|
Logger "Launching KillChilds \"$child\" true" "DEBUG"
|
||||||
KillChilds "$child" true
|
KillChilds "$child" true
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Try to kill nicely, if not, wait 15 seconds to let Trap actions happen before killing
|
# Try to kill nicely, if not, wait 15 seconds to let Trap actions happen before killing
|
||||||
if [ "$self" == true ]; then
|
if [ "$self" == true ]; then
|
||||||
if [ "$_DEBUG" == "yes" ]; then
|
Logger "Killing process $pid" "DEBUG"
|
||||||
Logger "Killing process $pid" "NOTICE"
|
|
||||||
kill -s SIGTERM "$pid"
|
kill -s SIGTERM "$pid"
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
sleep 15 && kill -9 "$pid" &
|
sleep 15 && kill -9 "$pid" &
|
||||||
@ -163,7 +163,6 @@ function KillChilds {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
# sleep 15 needs to wait before killing itself
|
# sleep 15 needs to wait before killing itself
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ PROGRAM_VERSION=2.0-pre
|
|||||||
PROGRAM_BUILD=2016040603
|
PROGRAM_BUILD=2016040603
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
## FUNC_BUILD=2016040802
|
## FUNC_BUILD=2016041001
|
||||||
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
## BEGIN Generic functions for osync & obackup written in 2013-2016 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
|
||||||
@ -147,14 +147,14 @@ function KillChilds {
|
|||||||
|
|
||||||
if children="$(pgrep -P "$pid")"; then
|
if children="$(pgrep -P "$pid")"; then
|
||||||
for child in $children; do
|
for child in $children; do
|
||||||
|
Logger "Launching KillChilds \"$child\" true" "DEBUG"
|
||||||
KillChilds "$child" true
|
KillChilds "$child" true
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Try to kill nicely, if not, wait 15 seconds to let Trap actions happen before killing
|
# Try to kill nicely, if not, wait 15 seconds to let Trap actions happen before killing
|
||||||
if [ "$self" == true ]; then
|
if [ "$self" == true ]; then
|
||||||
if [ "$_DEBUG" == "yes" ]; then
|
Logger "Killing process $pid" "DEBUG"
|
||||||
Logger "Killing process $pid" "NOTICE"
|
|
||||||
kill -s SIGTERM "$pid"
|
kill -s SIGTERM "$pid"
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
sleep 15 && kill -9 "$pid" &
|
sleep 15 && kill -9 "$pid" &
|
||||||
@ -163,7 +163,6 @@ function KillChilds {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
# sleep 15 needs to wait before killing itself
|
# sleep 15 needs to wait before killing itself
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user