From 21e099a6d6c3f9f2c2472064dca3ef4d1a80b663 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Tue, 30 Jul 2019 15:58:11 +0200 Subject: [PATCH] fix: [reset_AIL] fix #368 --- reset_AIL.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/reset_AIL.sh b/reset_AIL.sh index d2940d0c..2b477f92 100755 --- a/reset_AIL.sh +++ b/reset_AIL.sh @@ -80,6 +80,20 @@ function soft_reset { exit } +function flush_DB_keep_user { + pushd redis/src + ./redis-cli -p 6382 -n 1 FLUSHDB; + ./redis-cli -p 6382 -n 2 FLUSHDB; + ./redis-cli -p 6382 -n 3 FLUSHDB; + ./redis-cli -p 6382 -n 4 FLUSHDB; + ./redis-cli -p 6382 -n 5 FLUSHDB; + ./redis-cli -p 6382 -n 6 FLUSHDB; + ./redis-cli -p 6382 -n 7 FLUSHDB; + ./redis-cli -p 6382 -n 8 FLUSHDB; + ./redis-cli -p 6382 -n 9 FLUSHDB; + popd +} + #If no params, [[ $@ ]] || { # Make sure the reseting is intentional @@ -120,7 +134,8 @@ function soft_reset { while [ "$1" != "" ]; do case $1 in --softReset ) soft_reset; - ;; + flush_DB_keep_user; + ;; * ) exit 1 esac shift