update
This commit is contained in:
45
defaults.inc
45
defaults.inc
@@ -18,6 +18,8 @@ declare -i errtime
|
||||
|
||||
NM_SRVCOPT=(start stop restart reload enable disable)
|
||||
|
||||
echo "1: ${NM_HOSTS['MYSQL']}"
|
||||
|
||||
if [ -f ${FOLDER}/defaults.local.inc ]; then
|
||||
source ${FOLDER}/defaults.local.inc
|
||||
|
||||
@@ -35,7 +37,6 @@ if [ -f ${FOLDER}/defaults.local.inc ]; then
|
||||
PW_HOSTS=(${PWHOSTS})
|
||||
WM_HOSTS=(${WMHOSTS})
|
||||
|
||||
NODE_SERVICES=(${NODESERVICES})
|
||||
MYSQL_SERVICES_CHECK=(${MYSQLSERVICES_CHECK})
|
||||
WEB_SERVICES_CHECK=(${WEBSERVICES_CHECK})
|
||||
LB_SERVICES_CHECK=(${LBSERVICES_CHECK})
|
||||
@@ -54,11 +55,18 @@ if [ -f ${FOLDER}/defaults.local.inc ]; then
|
||||
|
||||
WEB_SINGLESRVR_SERVICES=(${WEB_SINGLESRVRSERVICES})
|
||||
WEB_SINGLESRVR_DOCKERS=(${WEB_SINGLESRVRDOCKERS})
|
||||
|
||||
for ntype in "${NODE_TYPES[@]}"; do
|
||||
${NM_HOSTS[${ntype}]}=(${NM_HOSTS[${ntype}]})
|
||||
done
|
||||
|
||||
unset IFS
|
||||
|
||||
fi
|
||||
|
||||
echo "2: ${NM_HOSTS['MYSQL']}"
|
||||
|
||||
|
||||
|
||||
GET-CHECKCERT-DOMAINS(){
|
||||
declare -A CHECKCERT_DOMAINS
|
||||
@@ -80,41 +88,6 @@ DISP_HEADER(){
|
||||
echo
|
||||
echo -e "${idsCL[LightGreen]} NodeMgmt - Node Monitoring & Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}"
|
||||
DIVIDER . lightGreen
|
||||
if [ "$2" = true ]; then
|
||||
echo -e " Node hostname : ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME}${idsCL[Default]}${idsST[Reset]}"
|
||||
if [ -z ${LOCAL_SERVICES+x} ]; then SERVICES=$( IFS=$','; echo "${NODE_SERVICES[*]}" )
|
||||
else SERVICES=$( IFS=$','; echo "${LOCAL_SERVICES[*]}" )
|
||||
fi
|
||||
IFS=,; SERVICES2=(${SERVICES}); unset IFS
|
||||
for srvc in "${SERVICES2[@]}"; do
|
||||
c=0; cw=18; spc=''
|
||||
spc1=${cw}-${#NM_SERVICES[${srvc}]}
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en " ${NM_SERVICES[${srvc}]}$spc: "
|
||||
if [ $(pgrep ${srvc} | wc -l) -gt "0" ]; then
|
||||
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
||||
else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
|
||||
fi
|
||||
done
|
||||
DIVIDER
|
||||
if [ $(ls -1 ${FOLDER}/*.lastrun 2>/dev/null | wc -l) != 0 ];then
|
||||
echo -e "${idsST[Bold]}Lastrun Items:${idsST[Reset]}"
|
||||
for lastrun in ${FOLDER}/*.lastrun ; do
|
||||
IFS='/'; lastrun_item=(${lastrun}); unset IFS
|
||||
lastrun_item=$(echo ${lastrun_item[4]} | sed "s/.lastrun//g")
|
||||
lastrun_item=$(echo ${lastrun_item} | sed "s/-/ /g")
|
||||
lastrun_date=$(stat -c %y ${lastrun})
|
||||
IFS=' '; lastrun_date=(${lastrun_date}); unset IFS
|
||||
IFS='.'; lastrun_time=(${lastrun_date[1]}); unset IFS
|
||||
c=0; cw=18; spc=''
|
||||
spc1=${cw}-${#lastrun_item}
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -e " ${lastrun_item~}${spc}: ${lastrun_date[0]} ${lastrun_time}"
|
||||
done
|
||||
|
||||
DIVIDER
|
||||
fi
|
||||
fi
|
||||
echo
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user