mirror of
https://github.com/ail-project/ail-framework.git
synced 2025-01-31 06:26:14 +00:00
fix: [reset_AIL] launch ardb + remove dir
This commit is contained in:
parent
193e431b76
commit
b54e60923c
1 changed files with 8 additions and 4 deletions
12
reset_AIL.sh
12
reset_AIL.sh
|
@ -6,7 +6,7 @@ GREEN="\\033[1;32m"
|
||||||
|
|
||||||
[ -z "$AIL_HOME" ] && echo "Needs the env var AIL_HOME. Run the script from the virtual environment." && exit 1;
|
[ -z "$AIL_HOME" ] && echo "Needs the env var AIL_HOME. Run the script from the virtual environment." && exit 1;
|
||||||
|
|
||||||
function soft_reset {
|
function reset_dir {
|
||||||
# Access dirs and delete
|
# Access dirs and delete
|
||||||
cd $AIL_HOME
|
cd $AIL_HOME
|
||||||
|
|
||||||
|
@ -98,6 +98,11 @@ function flush_DB_keep_user {
|
||||||
bash ${AIL_BIN}LAUNCH.sh -k
|
bash ${AIL_BIN}LAUNCH.sh -k
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function flush_DB_keep_user {
|
||||||
|
reset_dir;
|
||||||
|
flush_DB_keep_user;
|
||||||
|
}
|
||||||
|
|
||||||
#If no params,
|
#If no params,
|
||||||
[[ $@ ]] || {
|
[[ $@ ]] || {
|
||||||
# Make sure the reseting is intentional
|
# Make sure the reseting is intentional
|
||||||
|
@ -118,7 +123,7 @@ function flush_DB_keep_user {
|
||||||
echo -e $RED"If yes you want to delete the DB , enter the following number: "$DEFAULT $num
|
echo -e $RED"If yes you want to delete the DB , enter the following number: "$DEFAULT $num
|
||||||
read userInput
|
read userInput
|
||||||
|
|
||||||
soft_reset;
|
reset_dir;
|
||||||
|
|
||||||
if [ $userInput -eq $num ]
|
if [ $userInput -eq $num ]
|
||||||
then
|
then
|
||||||
|
@ -137,8 +142,7 @@ function flush_DB_keep_user {
|
||||||
|
|
||||||
while [ "$1" != "" ]; do
|
while [ "$1" != "" ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--softReset ) soft_reset;
|
--softReset ) flush_DB_keep_user;
|
||||||
flush_DB_keep_user;
|
|
||||||
;;
|
;;
|
||||||
* ) exit 1
|
* ) exit 1
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Add table
Reference in a new issue