CLICKHOUSE-4284 debian init: wait for server startup on 'clickhouse-server start'

This commit is contained in:
proller 2019-02-05 20:05:23 +03:00
parent d6b1cf1a85
commit 238cfb4da3

View File

@ -174,7 +174,16 @@ start()
fi
if [ $EXIT_STATUS -eq 0 ]; then
echo "DONE"
attempts=0
while ! is_running && [ $attempts -le 10 ]; do
attempts=$(($attempts + 1))
sleep 1
done
if is_running; then
echo "DONE"
else
echo "UNKNOWN"
fi
else
echo "FAILED"
fi