Skip to content
Snippets Groups Projects
Commit ea2f7eaf authored by fangyincheng's avatar fangyincheng
Browse files

Imp:modify scripts of examples

parent b24c098f
No related branches found
No related tags found
No related merge requests found
...@@ -57,13 +57,19 @@ go server ...@@ -57,13 +57,19 @@ go server
> You should change IP in dubbo/go-server/target/linux/user_info_server-0.3.1-20190517-0930-release/conf/server.yml > You should change IP in dubbo/go-server/target/linux/user_info_server-0.3.1-20190517-0930-release/conf/server.yml
```bash ```bash
cd dubbo/go-server/target/linux/user_info_server-0.3.1-20190517-0930-release cd dubbo/go-server/target/linux/user_info_server-0.3.1-20190517-0930-release
sh ./bin/load.sh start #conf suffix appoint config file,
#such as server_zookeeper.yml when "sh ./bin/load.sh start is zookeeper",
#default server.yml
sh ./bin/load.sh start [conf suffix]
``` ```
go client go client
```bash ```bash
cd dubbo/go-client/target/linux/user_info_client-0.3.1-20190517-0921-release cd dubbo/go-client/target/linux/user_info_client-0.3.1-20190517-0921-release
sh ./bin/load_user_info_client.sh start #conf suffix appoint config file,
#such as client_zookeeper.yml when "sh ./bin/load.sh start is zookeeper",
#default client.yml
sh ./bin/load_user_info_client.sh start [conf suffix]
``` ```
## jsonrpc ## jsonrpc
......
...@@ -29,7 +29,7 @@ export APP_LOG_CONF_FILE=${PROJECT_HOME}"TARGET_LOG_CONF_FILE" ...@@ -29,7 +29,7 @@ export APP_LOG_CONF_FILE=${PROJECT_HOME}"TARGET_LOG_CONF_FILE"
# export GODEBUG=gctrace=1 # export GODEBUG=gctrace=1
usage() { usage() {
echo "Usage: $0 start" echo "Usage: $0 start [conf suffix]"
echo " $0 stop" echo " $0 stop"
echo " $0 term" echo " $0 term"
echo " $0 restart" echo " $0 restart"
...@@ -40,6 +40,16 @@ usage() { ...@@ -40,6 +40,16 @@ usage() {
} }
start() { start() {
arg=$1
if [ "$arg" = "" ];then
echo "No registry type! Default client.yml!"
else
export CONF_CONSUMER_FILE_PATH=${CONF_CONSUMER_FILE_PATH//\.yml/\_$arg\.yml}
fi
if [ ! -f "${CONF_CONSUMER_FILE_PATH}" ];then
echo $CONF_CONSUMER_FILE_PATH" is not existing!"
return
fi
APP_LOG_PATH=${PROJECT_HOME}"logs/" APP_LOG_PATH=${PROJECT_HOME}"logs/"
mkdir -p ${APP_LOG_PATH} mkdir -p ${APP_LOG_PATH}
APP_BIN=${PROJECT_HOME}sbin/${APP_NAME} APP_BIN=${PROJECT_HOME}sbin/${APP_NAME}
...@@ -158,7 +168,7 @@ crontab() { ...@@ -158,7 +168,7 @@ crontab() {
opt=$1 opt=$1
case C"$opt" in case C"$opt" in
Cstart) Cstart)
start start $2
;; ;;
Cstop) Cstop)
stop stop
...@@ -168,7 +178,7 @@ case C"$opt" in ...@@ -168,7 +178,7 @@ case C"$opt" in
;; ;;
Crestart) Crestart)
term term
start start $2
;; ;;
Clist) Clist)
list list
......
...@@ -24,7 +24,7 @@ export CONF_PROVIDER_FILE_PATH=${PROJECT_HOME}"TARGET_CONF_FILE" ...@@ -24,7 +24,7 @@ export CONF_PROVIDER_FILE_PATH=${PROJECT_HOME}"TARGET_CONF_FILE"
export APP_LOG_CONF_FILE=${PROJECT_HOME}"TARGET_LOG_CONF_FILE" export APP_LOG_CONF_FILE=${PROJECT_HOME}"TARGET_LOG_CONF_FILE"
usage() { usage() {
echo "Usage: $0 start" echo "Usage: $0 start [conf suffix]"
echo " $0 stop" echo " $0 stop"
echo " $0 term" echo " $0 term"
echo " $0 restart" echo " $0 restart"
...@@ -35,6 +35,16 @@ usage() { ...@@ -35,6 +35,16 @@ usage() {
} }
start() { start() {
arg=$1
if [ "$arg" = "" ];then
echo "No registry type! Default server.yml!"
else
export CONF_PROVIDER_FILE_PATH=${CONF_PROVIDER_FILE_PATH//\.yml/\_$arg\.yml}
fi
if [ ! -f "${CONF_PROVIDER_FILE_PATH}" ];then
echo $CONF_PROVIDER_FILE_PATH" is not existing!"
return
fi
APP_LOG_PATH="${PROJECT_HOME}logs/" APP_LOG_PATH="${PROJECT_HOME}logs/"
mkdir -p ${APP_LOG_PATH} mkdir -p ${APP_LOG_PATH}
APP_BIN=${PROJECT_HOME}sbin/${APP_NAME} APP_BIN=${PROJECT_HOME}sbin/${APP_NAME}
...@@ -112,7 +122,7 @@ list() { ...@@ -112,7 +122,7 @@ list() {
opt=$1 opt=$1
case C"$opt" in case C"$opt" in
Cstart) Cstart)
start start $2
;; ;;
Cstop) Cstop)
stop stop
...@@ -122,7 +132,7 @@ case C"$opt" in ...@@ -122,7 +132,7 @@ case C"$opt" in
;; ;;
Crestart) Crestart)
term term
start start $2
;; ;;
Clist) Clist)
list list
......
...@@ -29,7 +29,7 @@ export APP_LOG_CONF_FILE=${PROJECT_HOME}"TARGET_LOG_CONF_FILE" ...@@ -29,7 +29,7 @@ export APP_LOG_CONF_FILE=${PROJECT_HOME}"TARGET_LOG_CONF_FILE"
# export GODEBUG=gctrace=1 # export GODEBUG=gctrace=1
usage() { usage() {
echo "Usage: $0 start" echo "Usage: $0 start [conf suffix]"
echo " $0 stop" echo " $0 stop"
echo " $0 term" echo " $0 term"
echo " $0 restart" echo " $0 restart"
...@@ -40,6 +40,16 @@ usage() { ...@@ -40,6 +40,16 @@ usage() {
} }
start() { start() {
arg=$1
if [ "$arg" = "" ];then
echo "No registry type! Default client.yml!"
else
export CONF_CONSUMER_FILE_PATH=${CONF_CONSUMER_FILE_PATH//\.yml/\_$arg\.yml}
fi
if [ ! -f "${CONF_CONSUMER_FILE_PATH}" ];then
echo $CONF_CONSUMER_FILE_PATH" is not existing!"
return
fi
APP_LOG_PATH=${PROJECT_HOME}"logs/" APP_LOG_PATH=${PROJECT_HOME}"logs/"
mkdir -p ${APP_LOG_PATH} mkdir -p ${APP_LOG_PATH}
APP_BIN=${PROJECT_HOME}sbin/${APP_NAME} APP_BIN=${PROJECT_HOME}sbin/${APP_NAME}
...@@ -158,7 +168,7 @@ crontab() { ...@@ -158,7 +168,7 @@ crontab() {
opt=$1 opt=$1
case C"$opt" in case C"$opt" in
Cstart) Cstart)
start start $2
;; ;;
Cstop) Cstop)
stop stop
...@@ -168,7 +178,7 @@ case C"$opt" in ...@@ -168,7 +178,7 @@ case C"$opt" in
;; ;;
Crestart) Crestart)
term term
start start $2
;; ;;
Clist) Clist)
list list
......
...@@ -24,7 +24,7 @@ export CONF_PROVIDER_FILE_PATH=${PROJECT_HOME}"TARGET_CONF_FILE" ...@@ -24,7 +24,7 @@ export CONF_PROVIDER_FILE_PATH=${PROJECT_HOME}"TARGET_CONF_FILE"
export APP_LOG_CONF_FILE=${PROJECT_HOME}"TARGET_LOG_CONF_FILE" export APP_LOG_CONF_FILE=${PROJECT_HOME}"TARGET_LOG_CONF_FILE"
usage() { usage() {
echo "Usage: $0 start" echo "Usage: $0 start [conf suffix]"
echo " $0 stop" echo " $0 stop"
echo " $0 term" echo " $0 term"
echo " $0 restart" echo " $0 restart"
...@@ -35,6 +35,16 @@ usage() { ...@@ -35,6 +35,16 @@ usage() {
} }
start() { start() {
arg=$1
if [ "$arg" = "" ];then
echo "No registry type! Default server.yml!"
else
export CONF_PROVIDER_FILE_PATH=${CONF_PROVIDER_FILE_PATH//\.yml/\_$arg\.yml}
fi
if [ ! -f "${CONF_PROVIDER_FILE_PATH}" ];then
echo $CONF_PROVIDER_FILE_PATH" is not existing!"
return
fi
APP_LOG_PATH="${PROJECT_HOME}logs/" APP_LOG_PATH="${PROJECT_HOME}logs/"
mkdir -p ${APP_LOG_PATH} mkdir -p ${APP_LOG_PATH}
APP_BIN=${PROJECT_HOME}sbin/${APP_NAME} APP_BIN=${PROJECT_HOME}sbin/${APP_NAME}
...@@ -112,7 +122,7 @@ list() { ...@@ -112,7 +122,7 @@ list() {
opt=$1 opt=$1
case C"$opt" in case C"$opt" in
Cstart) Cstart)
start start $2
;; ;;
Cstop) Cstop)
stop stop
...@@ -122,7 +132,7 @@ case C"$opt" in ...@@ -122,7 +132,7 @@ case C"$opt" in
;; ;;
Crestart) Crestart)
term term
start start $2
;; ;;
Clist) Clist)
list list
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment