mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-14 02:28:23 +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_BIN:$PATH
|
||||||
export PATH=$AIL_FLASK:$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 {
|
function helptext {
|
||||||
echo -e $YELLOW"
|
echo -e $YELLOW"
|
||||||
|
|
||||||
|
@ -276,14 +283,16 @@ function launch_queues {
|
||||||
function launch_scripts {
|
function launch_scripts {
|
||||||
if [[ ! $isscripted ]]; then
|
if [[ ! $isscripted ]]; then
|
||||||
sleep 1
|
sleep 1
|
||||||
if checking_redis && checking_ardb; then
|
if checking_ardb && checking_redis; then
|
||||||
launching_scripts $1;
|
launching_scripts $1;
|
||||||
else
|
else
|
||||||
while [[ (checking_ardb) && (checking_redis) ]]; do
|
no_script_launched=true
|
||||||
echo -e $YELLOW"\tScript not started, waiting 5 secondes"$DEFAULT
|
while $no_script_launched; do
|
||||||
|
echo -e $YELLOW"\tScript not started, waiting 5 more secondes"$DEFAULT
|
||||||
sleep 5
|
sleep 5
|
||||||
if checking_redis && checking_ardb; then
|
if checking_redis && checking_ardb; then
|
||||||
launching_scripts $1;
|
launching_scripts $1;
|
||||||
|
no_script_launched=false
|
||||||
else
|
else
|
||||||
echo -e $RED"\tScript not started"$DEFAULT
|
echo -e $RED"\tScript not started"$DEFAULT
|
||||||
fi;
|
fi;
|
||||||
|
@ -348,15 +357,6 @@ function launch_all {
|
||||||
launch_flask;
|
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
|
#If no params, display the menu
|
||||||
[[ $@ ]] || {
|
[[ $@ ]] || {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue