clamav-notify-server: fixed compatibility with RHEL6 coreutils
This commit is contained in:
parent
eed51b8ded
commit
dda88bd5f3
@ -23,6 +23,9 @@ NC=nc
|
|||||||
TIMEOUT_TERM=30
|
TIMEOUT_TERM=30
|
||||||
TIMEOUT_KILL=60
|
TIMEOUT_KILL=60
|
||||||
|
|
||||||
|
K_OPT=1
|
||||||
|
LANG=C timeout --help | grep -q -- '--kill-after' || unset K_OPT
|
||||||
|
|
||||||
get_sockets() {
|
get_sockets() {
|
||||||
(
|
(
|
||||||
cd /etc/clamd.d
|
cd /etc/clamd.d
|
||||||
@ -66,7 +69,7 @@ op_nc() {
|
|||||||
continue
|
continue
|
||||||
esac
|
esac
|
||||||
|
|
||||||
resp=`printf 'zRELOAD\0' | timeout -k $TIMEOUT_KILL $TIMEOUT_TERM "${CMD[@]}"`
|
resp=`printf 'zRELOAD\0' | timeout ${K_OPT:+-k $TIMEOUT_KILL} $TIMEOUT_TERM "${CMD[@]}"`
|
||||||
case $resp in
|
case $resp in
|
||||||
(RELOADING)
|
(RELOADING)
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user