mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
fix: [LAUNCH] script checking
This commit is contained in:
parent
d4f0c14620
commit
54e8750c30
1 changed files with 12 additions and 12 deletions
|
@ -21,6 +21,13 @@ export PATH=$AIL_ARDB:$PATH
|
|||
export PATH=$AIL_BIN:$PATH
|
||||
export PATH=$AIL_FLASK:$PATH
|
||||
|
||||
isredis=`screen -ls | egrep '[0-9]+.Redis_AIL' | cut -d. -f1`
|
||||
isardb=`screen -ls | egrep '[0-9]+.ARDB_AIL' | cut -d. -f1`
|
||||
islogged=`screen -ls | egrep '[0-9]+.Logging_AIL' | cut -d. -f1`
|
||||
isqueued=`screen -ls | egrep '[0-9]+.Queue_AIL' | cut -d. -f1`
|
||||
isscripted=`screen -ls | egrep '[0-9]+.Script_AIL' | cut -d. -f1`
|
||||
isflasked=`screen -ls | egrep '[0-9]+.Flask_AIL' | cut -d. -f1`
|
||||
|
||||
function helptext {
|
||||
echo -e $YELLOW"
|
||||
|
||||
|
@ -276,14 +283,16 @@ function launch_queues {
|
|||
function launch_scripts {
|
||||
if [[ ! $isscripted ]]; then
|
||||
sleep 1
|
||||
if checking_redis && checking_ardb; then
|
||||
if checking_ardb && checking_redis; then
|
||||
launching_scripts $1;
|
||||
else
|
||||
while [[ (checking_ardb) && (checking_redis) ]]; do
|
||||
echo -e $YELLOW"\tScript not started, waiting 5 secondes"$DEFAULT
|
||||
no_script_launched=true
|
||||
while $no_script_launched; do
|
||||
echo -e $YELLOW"\tScript not started, waiting 5 more secondes"$DEFAULT
|
||||
sleep 5
|
||||
if checking_redis && checking_ardb; then
|
||||
launching_scripts $1;
|
||||
no_script_launched=false
|
||||
else
|
||||
echo -e $RED"\tScript not started"$DEFAULT
|
||||
fi;
|
||||
|
@ -348,15 +357,6 @@ function launch_all {
|
|||
launch_flask;
|
||||
}
|
||||
|
||||
|
||||
############### TESTS ###################
|
||||
isredis=`screen -ls | egrep '[0-9]+.Redis_AIL' | cut -d. -f1`
|
||||
isardb=`screen -ls | egrep '[0-9]+.ARDB_AIL' | cut -d. -f1`
|
||||
islogged=`screen -ls | egrep '[0-9]+.Logging_AIL' | cut -d. -f1`
|
||||
isqueued=`screen -ls | egrep '[0-9]+.Queue_AIL' | cut -d. -f1`
|
||||
isscripted=`screen -ls | egrep '[0-9]+.Script_AIL' | cut -d. -f1`
|
||||
isflasked=`screen -ls | egrep '[0-9]+.Flask_AIL' | cut -d. -f1`
|
||||
|
||||
#If no params, display the menu
|
||||
[[ $@ ]] || {
|
||||
|
||||
|
|
Loading…
Reference in a new issue