From 74599556621e8a35e0d4a1fe0457a693f8012478 Mon Sep 17 00:00:00 2001 From: yuriy0803 <68668177+yuriy0803@users.noreply.github.com> Date: Sat, 26 Aug 2023 23:17:37 +0200 Subject: [PATCH] Create pool-reset.sh cmd bash pool-reset.sh --- pool-reset.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pool-reset.sh diff --git a/pool-reset.sh b/pool-reset.sh new file mode 100644 index 0000000..1e4ecac --- /dev/null +++ b/pool-reset.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# This is a shell script to reset a Redis pool. + +# Define the Redis CLI command to flush the specified database. +REDIS_CLI="redis-cli" +DB_NUMBER=0 + +# Function to reset the Redis pool. +reset_redis_pool() { + $REDIS_CLI -n $DB_NUMBER flushdb + echo "Redis pool reset complete." +} + +# Call the function to reset the Redis pool. +reset_redis_pool