From 3a64caadbeee03121e330ba0c9bb3b748be807ea Mon Sep 17 00:00:00 2001 From: Alawn Date: Fri, 10 Apr 2020 14:12:04 +0800 Subject: [PATCH] Improve any experience and README.md --- README.md | 19 ++++++++++++------- script/load | 15 +++++++-------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4bf9bb1..08fd7c9 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,16 @@ ## What the script can do -It is a boot menu as fast switch application environment and management +It is a boot menu for fast switch application environment and appilcation management -It provided a few of feature for application management +It provided a few of feature for application -- Browse state of application -- Log in system as application user -- Startup application -- Stop applicaiton +- Application startup/shutdown +- Log in system feels as simulated application user +- Show more property of application (running state, version, file size, last updated... ) +- Logging trace - Colorful UI displays +- Switch application fast and friendly ## Screenshot @@ -58,7 +59,11 @@ initrc=${base_home}/.injectrc ## Feature coming soon -- Display application's version on menu +- Logging trace (**Implemented**) + + > Switch to application's logging directory and tail -f xxx.out automatic + +- Display application's version on menu (**Implemented**) > Get version from app.war like as below > `unzip -p boss.war META-INF/MANIFEST.MF | grep Implementation-Version: | awk -F ':' '{print $2}'` diff --git a/script/load b/script/load index 2f3f8b1..fbd0425 100755 --- a/script/load +++ b/script/load @@ -84,7 +84,7 @@ main_menu() echo -e "--------------------------------------------------" echo -e "Please Enter Your Choice" echo -e "" - echo -e "[${yellow}1-$app_num${plain}]:Chose Application ${yellow}q${plain}:Exit Menu ${yellow}a${plain}:Details" + echo -e "[${yellow}1-$app_num${plain}]:Chose Application ${yellow}q${plain}:Quit ${yellow}d${plain}:Details" echo -e "--------------------------------------------------" echo -e "" @@ -109,10 +109,10 @@ main_menu() echo -e function_menu ;; - q) + q|Q) exit 0 ;; - a) + d|D) ## Show details all of application clear printf "%-25s %-15s %-5s %-10s\n" "Application" "Version" "Size" "LastUpdated" @@ -268,13 +268,12 @@ function_menu() node_id=${module_name}_${domain} - cmd="${startup_script} ${cur_app} -serverAddr ${conf_center_host} -appDataId ${profile_app} -commonDataId ${profile_common} -group ${conf_group} -filedir ${conf_directory}${moddule_name}/ -nodeId ${node_id}" - #echo ${cmd} + cmd="export HOME=${base_home};${startup_script} ${cur_app} -serverAddr ${conf_center_host} -appDataId ${profile_app} -commonDataId ${profile_common} -group ${conf_group} -filedir ${conf_directory}${moddule_name}/ -nodeId ${node_id}" clear echo -e "" echo -e "${blue}>> Now prepare startup application, please wait a moment...${plain}" - sh ${cmd} - #exit 0 + #sh ${cmd} + inject ${cmd} echo -e "" && read -s -n1 -p "Press any key continue..." break @@ -313,7 +312,7 @@ function_menu() inject ${cmd} break ;; - b|q) + b|q|B|Q) break ;; *)