mirror of
https://github.com/phusion/baseimage-docker.git
synced 2026-03-26 20:38:58 +00:00
25 lines
404 B
Bash
Executable File
25 lines
404 B
Bash
Executable File
#!/bin/bash
|
|
|
|
PIDFILE="/var/run/syslog-ng.pid"
|
|
|
|
syslogng_wait() {
|
|
if [ "$2" -ne 0 ]; then
|
|
return 1
|
|
fi
|
|
|
|
RET=1
|
|
for i in $(seq 1 30); do
|
|
status=0
|
|
syslog-ng-ctl stats >/dev/null 2>&1 || status=$?
|
|
if [ "$status" != "$1" ]; then
|
|
RET=0
|
|
break
|
|
fi
|
|
sleep 1s
|
|
done
|
|
return $RET
|
|
}
|
|
|
|
kill $(cat "$PIDFILE")
|
|
syslogng_wait 0 $?
|