diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
commit | dcc721a95bef6f0d8e6d8775b8efe33e5aecd562 (patch) | |
tree | 66a2774cd0ee294d019efd71d2544c70f42b2842 /tests/clickhouse-stop.sh | |
parent | Initial commit. (diff) | |
download | rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.tar.xz rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.zip |
Adding upstream version 8.2402.0.upstream/8.2402.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | tests/clickhouse-stop.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/clickhouse-stop.sh b/tests/clickhouse-stop.sh new file mode 100755 index 0000000..7f132d8 --- /dev/null +++ b/tests/clickhouse-stop.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# This is not a real test, but a script to stop clickhouse. It is +# implemented as test so that we can stop clickhouse at the time we need +# it (do so via Makefile.am). +# Copyright (C) 2018 Pascal Withopf and Adiscon GmbH +# Released under ASL 2.0 +. ${srcdir:=.}/diag.sh init +if [ "$CLICKHOUSE_STOP_CMD" == "" ]; then + exit_test +fi + +clickhouse-client --query="DROP DATABASE rsyslog" +sleep 1 +printf 'stopping clickhouse...\n' +#$SUDO sed -n -r 's/PID: ([0-9]+\.*)/\1/p' /var/lib/clickhouse/status > /tmp/clickhouse-server.pid +#$SUDO kill $($SUDO sed -n -r 's/PID: ([0-9]+\.*)/\1/p' /var/lib/clickhouse/status) +eval $CLICKHOUSE_STOP_CMD +sleep 1 # cosmetic: give clickhouse a chance to emit shutdown message +exit_test |