Commit 090cb3c01c918813feb3908867b4b46d781a4154
1 parent
4493866a
Exists in
master
Atualização da versão! Melhorias e correções no processo de instalação! By Questor
Showing
6 changed files
with
116 additions
and
58 deletions
Show diff stats
.directory
LBGenerator.tar.gz
No preview for this file type
ez_i.bash
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | : 'Trata-se de um módulo que oferece uma série de funcionalidades para |
3 | 3 | criar um instalador usando "bash". |
4 | 4 | |
5 | -Version 1.1.0b | |
5 | +Version 1.2.0b | |
6 | 6 | |
7 | 7 | Apache License |
8 | 8 | Version 2.0, January 2004 |
... | ... | @@ -146,8 +146,8 @@ f_ez_sed_ecp() { |
146 | 146 | : '"Escapar" strings para o comando "sed". |
147 | 147 | |
148 | 148 | Como há muitas semelhanças entre o escape para "sed" ("f_ez_sed") e |
149 | - escape para "grep" ("f_fl_cont_str") optei por colocar essa | |
150 | - função como utilitária para as outras duas citadas. | |
149 | + escape para "grep" ("f_fl_cont_str") optei por colocar essa função | |
150 | + como utilitária para as outras duas. | |
151 | 151 | |
152 | 152 | Args: |
153 | 153 | VAL_TO_ECP (str): Valor a ser "escapado". |
... | ... | @@ -171,10 +171,23 @@ f_ez_sed_ecp() { |
171 | 171 | DONT_ECP_SQ=0 |
172 | 172 | fi |
173 | 173 | F_EZ_SED_ECP_R=$VAL_TO_ECP |
174 | + | |
175 | + # NOTE: Com essa intervenção conseguimos passar argumentos para um comando | |
176 | + # "sed" mesmo que o texto tenha quebras de linha! By Questor | |
177 | + F_EZ_SED_ECP_R=$(echo -n "$F_EZ_SED_ECP_R" | awk 'BEGIN {RS="dn"} {gsub("\n","\\n"); printf $0}') | |
178 | + | |
179 | + # NOTE: Para os casos onde "\n" faz parte dos argumentos. Nesses casos | |
180 | + # os argumentos possuem "\n" em vez de quebras de linha efetivamente. Se | |
181 | + # desabilitado "\n" será tratado como texto e não será convertido para | |
182 | + # quebras! By Questor | |
174 | 183 | if [ ${DONT_ECP_NL} -eq 1 ] ; then |
175 | 184 | F_EZ_SED_ECP_R=$(echo "$F_EZ_SED_ECP_R" | sed 's/\\n/C0673CECED2D4A8FBA90C9B92B9508A8/g') |
176 | 185 | fi |
186 | + | |
187 | + # NOTE: Escapa valores, principalmente, para serem aplicados como | |
188 | + # argumentos em um comando de replace no "sed"! By Questor | |
177 | 189 | F_EZ_SED_ECP_R=$(echo "$F_EZ_SED_ECP_R" | sed 's/[]\/$*.^|[]/\\&/g') |
190 | + | |
178 | 191 | if [ ${DONT_ECP_SQ} -eq 0 ] ; then |
179 | 192 | F_EZ_SED_ECP_R=$(echo "$F_EZ_SED_ECP_R" | sed "s/'/\\\x27/g") |
180 | 193 | fi |
... | ... | @@ -197,10 +210,15 @@ f_ez_sed() { |
197 | 210 | REPLACE. Padrão 0. |
198 | 211 | DONT_ECP_NL (Optional[int]): 1 - Não "escapa" "\n" (quebra de |
199 | 212 | linha); 0 - "Escapa" "\n". Padrão 1. |
213 | + NOTE: Para os casos onde "\n" faz parte dos argumentos. Nesses casos | |
214 | + os argumentos possuem "\n" em vez de quebras de linha efetivamente. Se | |
215 | + desabilitado "\n" será tratado como texto e não será convertido para | |
216 | + quebras; | |
200 | 217 | REMOVE_LN (Optional[int]): 1 - Remove a linha que possui o |
201 | 218 | valor em TARGET; 0 - Faz o replace convencional. Padrão 0. |
202 | 219 | NTH_OCCUR (Optional[int]): Executará a operação escolhida |
203 | - apenas sobre a ocorrência indicada; Se -1, não executa. Padrão -1. | |
220 | + apenas sobre a ocorrência indicada (utilize 2 para fazer replace apenas | |
221 | + na 2 ocorrencia, por exemplo); Se -1, não executa. Padrão -1. | |
204 | 222 | ' |
205 | 223 | |
206 | 224 | FILE=$3 |
... | ... | @@ -602,8 +620,8 @@ F_GET_STDERR_R="" |
602 | 620 | F_GET_STDOUT_R="" |
603 | 621 | F_GET_EXIT_CODE_R=0 |
604 | 622 | f_get_stderr_stdout() { |
605 | - : 'Executar um comando e colocar a saída de stderr e stdout nas | |
606 | - variáveis "F_GET_STDERR_R" e "F_GET_STDOUT_R"!. | |
623 | + : 'Executar um comando e capturar a saída de stderr, stdout e | |
624 | + o "exit code". | |
607 | 625 | |
608 | 626 | Args: |
609 | 627 | CMD_TO_EXEC (str): Comando a ser executado. |
... | ... | @@ -611,6 +629,7 @@ f_get_stderr_stdout() { |
611 | 629 | Returns: |
612 | 630 | F_GET_STDERR_R (str): Saída para stderr. |
613 | 631 | F_GET_STDOUT_R (str): Saída para stdout. |
632 | + F_GET_EXIT_CODE_R (int): Código de saída. | |
614 | 633 | ' |
615 | 634 | |
616 | 635 | CMD_TO_EXEC=$1 |
... | ... | @@ -618,9 +637,9 @@ f_get_stderr_stdout() { |
618 | 637 | F_GET_STDOUT_R="" |
619 | 638 | unset t_std t_err t_ret |
620 | 639 | eval "$( eval "$CMD_TO_EXEC" 2> >(t_err=$(cat); typeset -p t_err) > >(t_std=$(cat); typeset -p t_std); t_ret=$?; typeset -p t_ret )" |
621 | - F_GET_EXIT_CODE_R=$t_ret | |
622 | 640 | F_GET_STDERR_R=$t_err |
623 | 641 | F_GET_STDOUT_R=$t_std |
642 | + F_GET_EXIT_CODE_R=$t_ret | |
624 | 643 | } |
625 | 644 | |
626 | 645 | YES_NO_R=0 |
... | ... | @@ -878,16 +897,18 @@ f_split() { |
878 | 897 | # NOTE: Devido a limitações do bash temos alguns problemas para |
879 | 898 | # poder obter a saída de um split via awk dentro de um array e |
880 | 899 | # por isso precisamos do uso da "quebra de linha" (\n) para |
881 | - # termos sucesso! Visto isso, removemos as quebras de linha | |
882 | - # momentaneamente depois as reintegramos! By Questor | |
883 | - TARGET_P=$(echo "$TARGET_P" | awk 'BEGIN {RS="dn" } {gsub("\n","£§¢¬¨") ;printf $0 }') | |
900 | + # termos sucesso. Visto isso, removemos as quebras de linha | |
901 | + # momentaneamente depois as reintegramos. O problema é que se | |
902 | + # houver quebra de linha na "string" passada, essa quebra se | |
903 | + # perde, ou seja, é erroneamente eliminada da saída! By Questor | |
904 | + TARGET_P=$(echo "$TARGET_P" | awk 'BEGIN {RS="dn" } {gsub("\n","3f2c417d448c46918289218b7337fcaf") ;printf $0 }') | |
884 | 905 | fi |
885 | 906 | |
886 | 907 | SPLIT_NOW=$(awk -F"$DELIMITER_P" '{for(i=1;i<=NF;i++){printf "%s\n", $i}}' <<<"${TARGET_P}") |
887 | 908 | |
888 | 909 | while IFS= read -r LINE_NOW; do |
889 | 910 | if [ ${REMOVE_N} -eq 1 ] ; then |
890 | - LN_NOW_WITH_N=$(awk 'BEGIN {RS="dn"} {gsub("£§¢¬¨","\n") ;printf $0 }' <<<"${LINE_NOW}") | |
911 | + LN_NOW_WITH_N=$(awk 'BEGIN {RS="dn"} {gsub("3f2c417d448c46918289218b7337fcaf","\n") ;printf $0 }' <<<"${LINE_NOW}") | |
891 | 912 | F_SPLIT_R+=("$LN_NOW_WITH_N") |
892 | 913 | else |
893 | 914 | F_SPLIT_R+=("$LINE_NOW") |
... | ... | @@ -1496,6 +1517,28 @@ f_procs_qtt() { |
1496 | 1517 | fi |
1497 | 1518 | } |
1498 | 1519 | |
1520 | +F_GET_UUID_R="" | |
1521 | +f_get_uuid() { | |
1522 | + : 'Gerar e retornar um UUID. | |
1523 | + | |
1524 | + Args: | |
1525 | + REM_DASH_P (Optional[int]): 0 - Não remove os "-" (traços); 1 - | |
1526 | + Remove os "-" (traços). Padrão 0. | |
1527 | + | |
1528 | + Returns: | |
1529 | + F_GET_UUID_R (str): UUID gerado. | |
1530 | + ' | |
1531 | + | |
1532 | + REM_DASH_P=$1 | |
1533 | + if [ -z "$REM_DASH_P" ] ; then | |
1534 | + REM_DASH_P=0 | |
1535 | + fi | |
1536 | + F_GET_UUID_R=$(cat /proc/sys/kernel/random/uuid) | |
1537 | + if [ ${REM_DASH_P} -eq 1 ] ; then | |
1538 | + F_GET_UUID_R="${F_GET_UUID_R//-}" | |
1539 | + fi | |
1540 | +} | |
1541 | + | |
1499 | 1542 | # < -------------------------------------------------------------------------- |
1500 | 1543 | |
1501 | 1544 | # > -------------------------------------------------------------------------- | ... | ... |
install.bash
... | ... | @@ -107,8 +107,12 @@ INSTRUCT_F="" |
107 | 107 | |
108 | 108 | # < -------------------------------------------------------------------------- |
109 | 109 | |
110 | +# NOTE: A razão para a existência dessas variáveis é "abistrair" o | |
111 | +# funcionamento de "f_about_distro" que obtêm informações a partir de | |
112 | +# dados da própria distro e portanto sujeito a variações! By Questor | |
110 | 113 | DISTRO_TYPE="" |
111 | 114 | DISTRO_NAME="" |
115 | + | |
112 | 116 | # > ----------------------------------------- |
113 | 117 | # Checar se a distro é compatível! |
114 | 118 | |
... | ... | @@ -459,18 +463,16 @@ f_svc_helper() { |
459 | 463 | SVC_HLP_IN_SILENCE (Optional[int]): 1 - Sem saída para o terminal; |
460 | 464 | 0 - Com saída para o terminal. Padrão 0. |
461 | 465 | ' |
462 | - | |
463 | 466 | SVC_HLP_NM_P=$1 |
464 | 467 | SVC_HLP_CMD_P=$2 |
465 | - | |
466 | 468 | SVC_HLP_IN_SILENCE=$3 |
467 | 469 | if [ -z "$SVC_HLP_IN_SILENCE" ] ; then |
468 | 470 | SVC_HLP_IN_SILENCE=0 |
469 | 471 | fi |
472 | + SVC_HLP_SILENCE_CMD="" | |
470 | 473 | if [ ${SVC_HLP_IN_SILENCE} -eq 1 ] ; then |
471 | 474 | SVC_HLP_SILENCE_CMD=" &>/dev/null" |
472 | 475 | fi |
473 | - | |
474 | 476 | if [[ "$DISTRO_TYPE" == "RH" ]] ; then |
475 | 477 | eval "systemctl $SVC_HLP_CMD_P $SVC_HLP_NM_P.service$SVC_HLP_SILENCE_CMD" |
476 | 478 | elif [[ "$DISTRO_TYPE" == "SUSE" ]] ; then |
... | ... | @@ -539,7 +541,6 @@ f_open_section |
539 | 541 | f_div_section |
540 | 542 | f_yes_no "Install $ES_NAME?" |
541 | 543 | if [ ${EZ_I_SKIP_ON_V} -eq 1 ] || [ ${YES_NO_R} -eq 1 ] ; then |
542 | - f_common_packs | |
543 | 544 | f_chk_by_path_hlp "/usr/local/elasticsearch" "d" "\"elasticsearch-1.7.5.tar.gz\" already installed in \"/usr/local/elasticsearch\"!" |
544 | 545 | F_BAK_MD_R=1 |
545 | 546 | if [ ${F_CHK_BY_PATH_HLP_R} -eq 1 ] ; then |
... | ... | @@ -553,6 +554,7 @@ if [ ${EZ_I_SKIP_ON_V} -eq 1 ] || [ ${YES_NO_R} -eq 1 ] ; then |
553 | 554 | fi |
554 | 555 | fi |
555 | 556 | if [ ${F_BAK_MD_R} -eq 1 ] ; then |
557 | + f_common_packs | |
556 | 558 | if [[ "$DISTRO_TYPE" == "RH" ]] ; then |
557 | 559 | f_pack_is_inst "java-1.8.0-openjdk" "yum" "\"java-1.8.0-openjdk\" already installed!" |
558 | 560 | if [ ${F_PACK_IS_INST_R} -eq 0 ] ; then |
... | ... | @@ -587,8 +589,8 @@ if [ ${EZ_I_SKIP_ON_V} -eq 1 ] || [ ${YES_NO_R} -eq 1 ] ; then |
587 | 589 | f_ez_sed "#http.jsonp.enable: true" "#http.jsonp.enable: true\n\n# It will not be accessible to others server (nodes) and will not discover\n# other server (nodes).\nnode.local: true" "/usr/local/elasticsearch/config/elasticsearch.yml" |
588 | 590 | fi |
589 | 591 | $ES_SERV_CMD start |
592 | + f_fire_hlp "elasticsearch" 9200 | |
590 | 593 | fi |
591 | - f_fire_hlp "elasticsearch" 9200 | |
592 | 594 | ES_INST=1 |
593 | 595 | fi |
594 | 596 | f_close_section |
... | ... | @@ -652,8 +654,8 @@ Use empty for \"$PG_PWD_F\"!" |
652 | 654 | PG_PWD_F=$GET_USR_INPUT_R |
653 | 655 | fi |
654 | 656 | QUESTION_F="Enter one ip or ip range for external access. |
655 | -e.g. \"172.20.143.89/32\" for a single host or \"172.20.143.0/24\" for a small network or \"10.6.0.0/16\" for a larger one! | |
656 | -Use empty for local access only!" | |
657 | +Use empty for local access only! | |
658 | +* e.g. \"172.20.143.89/32\" for a single host or \"172.20.143.0/24\" for a small network or \"10.6.0.0/16\" for a larger one!" | |
657 | 659 | f_div_section |
658 | 660 | f_get_usr_input "$QUESTION_F" 1 |
659 | 661 | QUESTION_F="" |
... | ... | @@ -2005,7 +2007,6 @@ if [ ${EZ_I_SKIP_ON_V} -eq 1 ] || [ ${YES_NO_R} -eq 1 ] ; then |
2005 | 2007 | fi |
2006 | 2008 | case "$HTTP_SRV_WSGI" in |
2007 | 2009 | u) |
2008 | - HTTP_PORT_W=8007 | |
2009 | 2010 | QUESTION_F="Enter the port number for NGINX service. |
2010 | 2011 | Use empty for \"$HTTP_PORT_W\" (recommended)!" |
2011 | 2012 | f_div_section |
... | ... | @@ -2018,7 +2019,6 @@ Use empty for \"$HTTP_PORT_W\" (recommended)!" |
2018 | 2019 | f_fire_hlp "NGINX" $HTTP_PORT_W |
2019 | 2020 | ;; |
2020 | 2021 | p) |
2021 | - HTTP_PORT_W=8007 | |
2022 | 2022 | QUESTION_F="Enter the port number for NGINX service. |
2023 | 2023 | Use empty for \"$HTTP_PORT_W\" (recommended)!" |
2024 | 2024 | f_div_section |
... | ... | @@ -2032,7 +2032,6 @@ Use empty for \"$HTTP_PORT_W\" (recommended)!" |
2032 | 2032 | f_fire_hlp "NGINX" $HTTP_PORT_W |
2033 | 2033 | ;; |
2034 | 2034 | a) |
2035 | - HTTP_PORT_W=8007 | |
2036 | 2035 | QUESTION_F="Enter the port number for Apache (httpd) service. |
2037 | 2036 | Use empty for \"$HTTP_PORT_W\" (recommended)!" |
2038 | 2037 | f_div_section |
... | ... | @@ -2077,7 +2076,6 @@ Use empty for \"$PG_CFG_F\"!" |
2077 | 2076 | if [ -n "$GET_USR_INPUT_R" ] ; then |
2078 | 2077 | PG_CFG_F=$GET_USR_INPUT_R |
2079 | 2078 | fi |
2080 | - HTTP_PORT_A=8008 | |
2081 | 2079 | QUESTION_F="Enter the port number for LBG - LBGenerator service. |
2082 | 2080 | Use empty for \"$HTTP_PORT_A\" (recommended)!" |
2083 | 2081 | f_div_section |
... | ... | @@ -2088,7 +2086,7 @@ Use empty for \"$HTTP_PORT_A\" (recommended)!" |
2088 | 2086 | fi |
2089 | 2087 | f_fire_hlp "LBG - LBGenerator" $HTTP_PORT_A |
2090 | 2088 | QUESTION_F="Enter the LBG - LBGenerator base URL. |
2091 | -Use empty for \"$APP_ROOT_F\" (will result in http://<machine_ip_or_name>/$APP_ROOT_F)!" | |
2089 | +Use empty for \"$APP_ROOT_F\" (will result in http://<machine_ip_or_name>:$HTTP_PORT_A/$APP_ROOT_F)!" | |
2092 | 2090 | f_div_section |
2093 | 2091 | f_get_usr_input "$QUESTION_F" 1 |
2094 | 2092 | QUESTION_F="" |
... | ... | @@ -2226,7 +2224,7 @@ Use empty for \"$REQ_TIMEOUT\"$TOO_LOW_REQ_TIMEOUT |
2226 | 2224 | f_ez_sed "<LBI_LBINDEX_URL>" "$LBI_LBINDEX_URL" "$BASE_INST_DIR_V/lbg_ve32/src/LBGenerator/production.ini" |
2227 | 2225 | f_ez_sed "<ES_ESDEF_URL>" "$ES_ESDEF_URL" "$BASE_INST_DIR_V/lbg_ve32/src/LBGenerator/production.ini" |
2228 | 2226 | f_ez_sed "<SQLA_URL>" "$PG_CFG_F" "$BASE_INST_DIR_V/lbg_ve32/src/LBGenerator/production.ini" 1 |
2229 | - f_ez_sed "<APP_ROOT_F>" "$APP_ROOT_F" "$BASE_INST_DIR_V/lbg_ve32/src/LBGenerator/production.ini" 1 | |
2227 | + f_ez_sed "<APP_ROOT_F>" "$APP_ROOT_F" "$BASE_INST_DIR_V/lbg_ve32/src/LBGenerator/production.ini" | |
2230 | 2228 | f_chk_by_path_hlp "$NGINX_CONF_PATH/lbg.conf" "f" "\"lbg.conf\" already created in \"$NGINX_CONF_PATH/lbg.conf\"!" |
2231 | 2229 | F_BAK_MD_R=1 |
2232 | 2230 | if [ ${F_CHK_BY_PATH_HLP_R} -eq 1 ] ; then |
... | ... | @@ -2330,9 +2328,7 @@ if [ ${CONF_PG} -eq 1 ] || [ ${CREATE_LB_DT} -eq 1 ] ; then |
2330 | 2328 | fi |
2331 | 2329 | |
2332 | 2330 | if [ -n "$CONF_PG_VL$CREATE_LB_DT_VL" ] ; then |
2333 | - PERSIST_CONFIG=" LBG - LBGenerator $PG_NAME persistence config...$CREATE_LB_DT_VL$CONF_PG_VL | |
2334 | - | |
2335 | -" | |
2331 | + PERSIST_CONFIG=" LBG - LBGenerator $PG_NAME persistence config...$CREATE_LB_DT_VL$CONF_PG_VL" | |
2336 | 2332 | fi |
2337 | 2333 | fi |
2338 | 2334 | |
... | ... | @@ -2343,17 +2339,13 @@ if [ ${PG_INST} -eq 1 ] ; then |
2343 | 2339 | |
2344 | 2340 | To start/stop... |
2345 | 2341 | systemctl start $PG_SERV_NAME.service |
2346 | - systemctl stop $PG_SERV_NAME.service | |
2347 | - | |
2348 | -" | |
2342 | + systemctl stop $PG_SERV_NAME.service" | |
2349 | 2343 | else |
2350 | 2344 | PG_SVC_INFO=" $PG_NAME |
2351 | 2345 | |
2352 | 2346 | To start/stop... |
2353 | 2347 | service $PG_SERV_NAME start |
2354 | - service $PG_SERV_NAME stop | |
2355 | - | |
2356 | -" | |
2348 | + service $PG_SERV_NAME stop" | |
2357 | 2349 | fi |
2358 | 2350 | fi |
2359 | 2351 | |
... | ... | @@ -2363,9 +2355,7 @@ if [ ${ES_INST} -eq 1 ] ; then |
2363 | 2355 | |
2364 | 2356 | To start/stop... |
2365 | 2357 | $ES_SERV_CMD start |
2366 | - $ES_SERV_CMD stop | |
2367 | - | |
2368 | -" | |
2358 | + $ES_SERV_CMD stop" | |
2369 | 2359 | fi |
2370 | 2360 | |
2371 | 2361 | UWSGI_SVC_INFO="" |
... | ... | @@ -2387,9 +2377,7 @@ if [ ${UWSGI_INST} -eq 1 ] ; then |
2387 | 2377 | vi $BASE_INST_DIR_V/uwsgi_ve32/src/uWSGI/production.ini |
2388 | 2378 | |
2389 | 2379 | Log... |
2390 | - less /var/log/uwsgi.log | |
2391 | - | |
2392 | -" | |
2380 | + less /var/log/uwsgi.log" | |
2393 | 2381 | fi |
2394 | 2382 | |
2395 | 2383 | SVISOR_SVC_INFO="" |
... | ... | @@ -2420,9 +2408,7 @@ if [ ${SVISOR_INST} -eq 1 ] ; then |
2420 | 2408 | \"[eventlistener:memmon]\" in supervisord.conf! |
2421 | 2409 | |
2422 | 2410 | python$PYTHON_2_X virtual environment path... |
2423 | - $BASE_INST_DIR_V/$VE_2_X | |
2424 | - | |
2425 | -" | |
2411 | + $BASE_INST_DIR_V/$VE_2_X" | |
2426 | 2412 | fi |
2427 | 2413 | |
2428 | 2414 | APACHE_SVC_INFO="" |
... | ... | @@ -2456,9 +2442,7 @@ if [ ${APACHE_INST} -eq 1 ] ; then |
2456 | 2442 | vi $HTTPD_CONF_PATH/lbg.conf |
2457 | 2443 | |
2458 | 2444 | Log... |
2459 | - less $VAR_LOG_HTTPD/$ERROR_LOG_FL | |
2460 | - | |
2461 | -" | |
2445 | + less $VAR_LOG_HTTPD/$ERROR_LOG_FL" | |
2462 | 2446 | fi |
2463 | 2447 | |
2464 | 2448 | NGINX_SVC_INFO="" |
... | ... | @@ -2483,9 +2467,7 @@ if [ ${NGINX_INST} -eq 1 ] ; then |
2483 | 2467 | vi $NGINX_CONF_PATH/lbg.conf |
2484 | 2468 | |
2485 | 2469 | Log... |
2486 | - less /var/log/nginx/error.log | |
2487 | - | |
2488 | -" | |
2470 | + less /var/log/nginx/error.log" | |
2489 | 2471 | fi |
2490 | 2472 | |
2491 | 2473 | LBG_SVC_INFO="" |
... | ... | @@ -2518,13 +2500,51 @@ if [ ${LBG_INST} -eq 1 ] ; then |
2518 | 2500 | $BASE_INST_DIR_V/py32 |
2519 | 2501 | |
2520 | 2502 | python3.2 virtual environment path... |
2521 | - $BASE_INST_DIR_V/lbg_ve32 | |
2522 | - | |
2523 | -" | |
2503 | + $BASE_INST_DIR_V/lbg_ve32" | |
2524 | 2504 | fi |
2525 | 2505 | |
2526 | 2506 | if [ -n "$PG_SVC_INFO$ES_SVC_INFO$SVISOR_SVC_INFO$APACHE_SVC_INFO$NGINX_SVC_INFO$LBG_SVC_INFO" ] ; then |
2527 | - USEFUL_INFO_F="$PG_SVC_INFO$PERSIST_CONFIG$ES_SVC_INFO$SVISOR_SVC_INFO$UWSGI_SVC_INFO$APACHE_SVC_INFO$NGINX_SVC_INFO$LBG_SVC_INFO" | |
2507 | + | |
2508 | + # NOTE: First item! By Questor | |
2509 | + USEFUL_INFO_F="$PG_SVC_INFO" | |
2510 | + | |
2511 | + # TODO: Inserir a flag "-e" em todos "echos" de funcionalidades que | |
2512 | + # "printam" mensagens para o usuário no "ez_i.bash"? By Questor | |
2513 | + | |
2514 | + # NOTE: There is no way to represent a literal (\n in case) for "echo" | |
2515 | + # without using the "-e" flag! By Questor | |
2516 | + USEFUL_INFO_NEW_LINES=" | |
2517 | + | |
2518 | +" | |
2519 | + | |
2520 | + if [ -n "$USEFUL_INFO_F" ] && [ -n "$PERSIST_CONFIG" ] ; then | |
2521 | + USEFUL_INFO_F="$USEFUL_INFO_F$USEFUL_INFO_NEW_LINES" | |
2522 | + fi | |
2523 | + USEFUL_INFO_F="$USEFUL_INFO_F$PERSIST_CONFIG" | |
2524 | + if [ -n "$USEFUL_INFO_F" ] && [ -n "$ES_SVC_INFO" ] ; then | |
2525 | + USEFUL_INFO_F="$USEFUL_INFO_F$USEFUL_INFO_NEW_LINES" | |
2526 | + fi | |
2527 | + USEFUL_INFO_F="$USEFUL_INFO_F$ES_SVC_INFO" | |
2528 | + if [ -n "$USEFUL_INFO_F" ] && [ -n "$SVISOR_SVC_INFO" ] ; then | |
2529 | + USEFUL_INFO_F="$USEFUL_INFO_F$USEFUL_INFO_NEW_LINES" | |
2530 | + fi | |
2531 | + USEFUL_INFO_F="$USEFUL_INFO_F$SVISOR_SVC_INFO" | |
2532 | + if [ -n "$USEFUL_INFO_F" ] && [ -n "$UWSGI_SVC_INFO" ] ; then | |
2533 | + USEFUL_INFO_F="$USEFUL_INFO_F$USEFUL_INFO_NEW_LINES" | |
2534 | + fi | |
2535 | + USEFUL_INFO_F="$USEFUL_INFO_F$UWSGI_SVC_INFO" | |
2536 | + if [ -n "$USEFUL_INFO_F" ] && [ -n "$APACHE_SVC_INFO" ] ; then | |
2537 | + USEFUL_INFO_F="$USEFUL_INFO_F$USEFUL_INFO_NEW_LINES" | |
2538 | + fi | |
2539 | + USEFUL_INFO_F="$USEFUL_INFO_F$APACHE_SVC_INFO" | |
2540 | + if [ -n "$USEFUL_INFO_F" ] && [ -n "$NGINX_SVC_INFO" ] ; then | |
2541 | + USEFUL_INFO_F="$USEFUL_INFO_F$USEFUL_INFO_NEW_LINES" | |
2542 | + fi | |
2543 | + USEFUL_INFO_F="$USEFUL_INFO_F$NGINX_SVC_INFO" | |
2544 | + if [ -n "$USEFUL_INFO_F" ] && [ -n "$LBG_SVC_INFO" ] ; then | |
2545 | + USEFUL_INFO_F="$USEFUL_INFO_F$USEFUL_INFO_NEW_LINES" | |
2546 | + fi | |
2547 | + USEFUL_INFO_F="$USEFUL_INFO_F$LBG_SVC_INFO" | |
2528 | 2548 | else |
2529 | 2549 | USEFUL_INFO_F=" Nothing was installed!" |
2530 | 2550 | fi | ... | ... |
lbn-basic-dt-strt/lb_basic_dt_strt.sql
... | ... | @@ -687,7 +687,7 @@ COPY lb_base (id_base, name, struct, dt_base, idx_exp, idx_exp_url, idx_exp_time |
687 | 687 | 2 _form {"content":[{"field":{"name":"id_base","datatype":"Integer","required":true,"alias":"id_base","multivalued":false,"indices":["Textual"],"description":"Base ID."}},{"field":{"name":"author","datatype":"Text","required":true,"alias":"author","multivalued":false,"indices":["Textual"],"description":"Event Author."}},{"field":{"name":"name","datatype":"Text","required":true,"alias":"name","multivalued":false,"indices":["Textual"],"description":"Form name."}},{"field":{"name":"description","datatype":"Text","required":true,"alias":"description","multivalued":false,"indices":["Textual"],"description":"Form description."}},{"field":{"name":"structure","datatype":"Json","required":true,"alias":"structure","multivalued":false,"indices":["Textual"],"description":"Form structure"}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase's Form Meta Base.","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":2,"name":"_form","owner":"","password":"","txt_mapping":"","model":{"author":"Text","description":"Text","id_base":"Integer","name":"Text","structure":"Json"}}} 2017-01-01 00:00:00 f 0 f 0 |
688 | 688 | 3 _history {"content":[{"field":{"alias":"id_base","description":"Base old ID.","name":"id_base","datatype":"Integer","indices":["Textual"],"required":true,"multivalued":false}},{"field":{"alias":"author","description":"Event Author.","name":"author","datatype":"Text","indices":["Textual"],"required":true,"multivalued":false}},{"field":{"alias":"date","description":"Event Date.","name":"date","datatype":"DateTime","indices":["Textual"],"required":true,"multivalued":false}},{"field":{"alias":"name","description":"Base old name.","name":"name","datatype":"Text","indices":["Textual"],"required":true,"multivalued":false}},{"field":{"alias":"structure","description":"Base old structure","name":"structure","datatype":"Json","indices":["Textual"],"required":true,"multivalued":false}},{"field":{"alias":"status","description":"Base status","name":"status","datatype":"Text","indices":["Textual"],"required":true,"multivalued":false}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase - History Meta Base.","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":3,"name":"_history","owner":"","password":"","txt_mapping":"","model":{"author":"Text","date":"DateTime","id_base":"Integer","name":"Text","status":"Text","structure":"Json"}}} 2017-01-01 00:00:00 f 0 f 0 |
689 | 689 | 7 _user {"content":[{"field":{"alias":"id","description":"LightBase's uses ID","name":"id_user","datatype":"Integer","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"name","description":"User's name","name":"name_user","datatype":"Text","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"email","description":"User's mail","name":"email_user","datatype":"Text","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"passwd","description":"User's password","name":"passwd_user","datatype":"Text","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"group":{"content":[{"field":{"alias":"name_base","description":"Name of the base the user can access","name":"name_base","datatype":"Text","indices":["Textual","Ordenado","Fuzzy"],"required":false,"multivalued":false}},{"field":{"alias":"access_type","description":"Type of access the user has","name":"access_type","datatype":"Text","indices":["Textual","Ordenado"],"required":false,"multivalued":false}}],"metadata":{"alias":"bases","description":"List of bases that the user can access and what kind of access it is","multivalued":true,"name":"bases_user"}}},{"field":{"alias":"creation_date","description":"Date the user account was created","name":"creation_date_user","datatype":"Date","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"status","description":"Check if the user is activer or not","name":"status_user","datatype":"Boolean","indices":["Textual","Ordenado"],"required":true,"multivalued":false}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase's Users Meta Base.","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":7,"name":"_user","owner":"","password":"","txt_mapping":"","model":{"creation_date_user":"Date","email_user":"Text","id_user":"Integer","name_user":"Text","passwd_user":"Text","status_user":"Boolean","bases_user":[{"access_type":"Text","name_base":"Text"}]}}} 2017-01-01 00:00:00 f 0 f 0 |
690 | -8 app_user {"content":[{"field":{"name":"id_user","datatype":"Text","required":true,"alias":"id_user","multivalued":false,"indices":["Textual","Ordenado"],"description":"LightBase's uses ID"}},{"field":{"name":"name_user","datatype":"Text","required":true,"alias":"name","multivalued":false,"indices":["Textual","Ordenado"],"description":"User's name"}},{"field":{"name":"email_user","datatype":"Text","required":true,"alias":"email","multivalued":false,"indices":["Textual","Ordenado"],"description":"User's mail"}},{"field":{"name":"passwd_user","datatype":"Text","required":true,"alias":"passwd","multivalued":false,"indices":["Textual","Ordenado"],"description":"User's password"}},{"field":{"name":"bases","datatype":"Integer","required":false,"alias":"bases","multivalued":true,"indices":["Textual"],"description":"Id doc list the base the user is owner"}},{"field":{"name":"forms","datatype":"Integer","required":false,"alias":"forms","multivalued":true,"indices":["Textual"],"description":"Id doc list of the form where user can access"}},{"field":{"name":"reports","datatype":"Text","required":false,"alias":"reports","multivalued":true,"indices":["Textual"],"description":"Id doc list of the report where user can access"}},{"group":{"content":[{"field":{"name":"id","datatype":"Integer","required":true,"alias":"id","multivalued":false,"indices":["Textual"],"description":"Id doc of element"}},{"field":{"name":"type","datatype":"Text","required":true,"alias":"type","multivalued":false,"indices":["Textual"],"description":"Types allowed form, base and report"}}],"metadata":{"multivalued":true,"alias":"shortcuts","name":"shortcuts","description":"List of shortcuts of user"}}},{"field":{"name":"creation_date_user","datatype":"Date","required":true,"alias":"creation_date","multivalued":false,"indices":["Textual","Ordenado"],"description":"Date the user account was created"}},{"field":{"name":"status_user","datatype":"Boolean","required":true,"alias":"status","multivalued":false,"indices":["Textual","Ordenado"],"description":"Check if the user is activer or not"}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase's Users Meta Base.","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":8,"name":"app_user","owner":"","password":"","txt_mapping":"","model":{"bases":["Integer"],"creation_date_user":"Date","email_user":"Text","forms":["Integer"],"id_user":"Text","name_user":"Text","passwd_user":"Text","reports":["Text"],"status_user":"Boolean","shortcuts":[{"id":"Integer","type":"Text"}]}}} 2017-01-01 00:00:00 f 0 f 0 | |
690 | +8 app_user {"content":[{"field":{"name":"id_user","datatype":"Text","required":true,"alias":"id_user","multivalued":false,"indices":["Textual","Ordenado"],"description":"LightBase's uses ID"}},{"field":{"name":"name_user","datatype":"Text","required":true,"alias":"name","multivalued":false,"indices":["Textual","Ordenado"],"description":"User's name"}},{"field":{"name":"email_user","datatype":"Text","required":true,"alias":"email","multivalued":false,"indices":["Textual","Ordenado"],"description":"User's mail"}},{"field":{"name":"passwd_user","datatype":"Text","required":true,"alias":"passwd","multivalued":false,"indices":["Textual","Ordenado"],"description":"User's password"}},{"field":{"name":"bases","datatype":"Integer","required":false,"alias":"bases","multivalued":true,"indices":["Textual"],"description":"Id doc list the base the user is owner"}},{"field":{"name":"forms","datatype":"Integer","required":false,"alias":"forms","multivalued":true,"indices":["Textual"],"description":"Id doc list of the form where user can access"}},{"field":{"name":"reports","datatype":"Integer","required":false,"alias":"reports","multivalued":true,"indices":["Textual"],"description":"Id doc list of the report where user can access"}},{"field":{"name":"searchs","datatype":"Integer","required":false,"alias":"searchs","multivalued":true,"indices":["Textual"],"description":"Id doc list of the search where user can access"}},{"group":{"content":[{"field":{"name":"id","datatype":"Integer","required":true,"alias":"id","multivalued":false,"indices":["Textual"],"description":"Id doc of element"}},{"field":{"name":"type","datatype":"Text","required":true,"alias":"type","multivalued":false,"indices":["Textual"],"description":"Types allowed form, base and report"}}],"metadata":{"multivalued":true,"alias":"shortcuts","name":"shortcuts","description":"List of shortcuts of user"}}},{"field":{"name":"creation_date_user","datatype":"Date","required":true,"alias":"creation_date","multivalued":false,"indices":["Textual","Ordenado"],"description":"Date the user account was created"}},{"field":{"name":"status_user","datatype":"Boolean","required":true,"alias":"status","multivalued":false,"indices":["Textual","Ordenado"],"description":"Check if the user is activer or not"}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase's Users Meta Base.","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":8,"name":"app_user","owner":"","password":"","txt_mapping":"","model":{"bases":["Integer"],"creation_date_user":"Date","email_user":"Text","forms":["Integer"],"id_user":"Text","name_user":"Text","passwd_user":"Text","reports":["Integer"],"searchs":["Integer"],"status_user":"Boolean","shortcuts":[{"id":"Integer","type":"Text"}]}}} 2017-01-01 00:00:00 f 0 f 0 | |
691 | 691 | 9 log_lbconverter {"content":[{"field":{"name":"nm_base","datatype":"Text","required":true,"alias":"Nome da base","multivalued":false,"indices":["Ordenado"],"description":"Nome da base"}},{"field":{"name":"id_doc_orig","datatype":"Integer","required":true,"alias":"id_doc_orig","multivalued":false,"indices":["Textual","Ordenado"],"description":"id do documento que originou o erro."}},{"field":{"name":"id_file_orig","datatype":"Text","required":true,"alias":"id_file_orig","multivalued":false,"indices":["Textual"],"description":"ID do arquivo que originou o erro."}},{"field":{"name":"file_name","datatype":"Text","required":true,"alias":"file_name","multivalued":false,"indices":["Ordenado"],"description":"File name"}},{"field":{"name":"error_msg","datatype":"Text","required":true,"alias":"Mensagem de erro","multivalued":false,"indices":["Nenhum"],"description":"Mensagem de erro"}},{"field":{"name":"dt_error","datatype":"DateTime","required":true,"alias":"Data do erro","multivalued":false,"indices":["Textual","Ordenado"],"description":"Data do erro"}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase - Log de erros do LBConverter","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":9,"name":"log_lbconverter","owner":"","password":"","txt_mapping":"","model":{"dt_error":"DateTime","error_msg":"Text","file_name":"Text","id_doc_orig":"Integer","id_file_orig":"Text","nm_base":"Text"}}} 2017-01-01 00:00:00 f 0 f 0 |
692 | 692 | 5 _report {"content":[{"field":{"name":"id_base","datatype":"Integer","required":true,"alias":"id_base","multivalued":false,"indices":["Textual"],"description":"Base ID."}},{"field":{"name":"author","datatype":"Text","required":true,"alias":"author","multivalued":false,"indices":["Textual"],"description":"Event Author."}},{"field":{"name":"name","datatype":"Text","required":true,"alias":"name","multivalued":false,"indices":["Textual"],"description":"Report name."}},{"field":{"name":"description","datatype":"Text","required":true,"alias":"description","multivalued":false,"indices":["Textual"],"description":"Report description."}},{"field":{"name":"structure","datatype":"Json","required":true,"alias":"structure","multivalued":false,"indices":["Textual"],"description":"Report structure"}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase's Report Meta Base.","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":5,"name":"_report","owner":"","password":"","txt_mapping":"","model":{"author":"Text","description":"Text","id_base":"Integer","name":"Text","structure":"Json"}}} 2017-01-01 00:00:00 f 0 f 0 |
693 | 693 | 10 log_lbindex {"content":[{"field":{"alias":"Nome da base","description":"Nome da base","name":"nm_base","datatype":"Text","indices":["Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"identificador do documento","description":"id do documento que originou o erro.","name":"id_doc_orig","datatype":"Integer","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"Mensagem de erro","description":"Mensagem de erro","name":"error_msg","datatype":"Text","indices":["Nenhum"],"required":true,"multivalued":false}},{"field":{"alias":"Data do erro","description":"Data e Hora no formato DD/MM/AAAA - HH:MM:SS do erro","name":"dt_error","datatype":"DateTime","indices":["Textual","Ordenado"],"required":true,"multivalued":false}},{"field":{"alias":"dt_last_up_orig","description":"Data e Hora no formato DD/MM/AAAA - HH:MM:SS da última atualização do registro que originou o erro.","name":"dt_last_up_orig","datatype":"DateTime","indices":["Textual","Ordenado"],"required":true,"multivalued":false}}],"metadata":{"admin_users":[],"color":"#000000","description":"LightBase - Log de erros do LBIndex","dt_base":"01/01/2017 00:00:00","file_ext":false,"file_ext_time":0,"idx_exp":false,"idx_exp_time":0,"idx_exp_url":"","id_base":10,"name":"log_lbindex","owner":"","password":"","txt_mapping":"","model":{"dt_error":"DateTime","dt_last_up_orig":"DateTime","error_msg":"Text","id_doc_orig":"Integer","nm_base":"Text"}}} 2017-01-01 00:00:00 f 0 f 0 | ... | ... |
liblightbase.tar.gz
No preview for this file type