mirror of https://github.com/CIRCL/AIL-framework
fix: [reset_AIL] fix #368
parent
de57f9b9e7
commit
21e099a6d6
17
reset_AIL.sh
17
reset_AIL.sh
|
@ -80,6 +80,20 @@ function soft_reset {
|
||||||
exit
|
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,
|
#If no params,
|
||||||
[[ $@ ]] || {
|
[[ $@ ]] || {
|
||||||
# Make sure the reseting is intentional
|
# Make sure the reseting is intentional
|
||||||
|
@ -120,7 +134,8 @@ function soft_reset {
|
||||||
while [ "$1" != "" ]; do
|
while [ "$1" != "" ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--softReset ) soft_reset;
|
--softReset ) soft_reset;
|
||||||
;;
|
flush_DB_keep_user;
|
||||||
|
;;
|
||||||
* ) exit 1
|
* ) exit 1
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
|
|
Loading…
Reference in New Issue