提交 f63a55b4 编写于 作者: Y Your Name

修改编译脚本

上级 cd8e4a1b
...@@ -12,7 +12,7 @@ OUTPATH="${BasePath}/out/console-${VERSION}" ...@@ -12,7 +12,7 @@ OUTPATH="${BasePath}/out/console-${VERSION}"
buildApp console $VERSION buildApp console $VERSION
mkdir ${OUTPATH}/static mkdir ${OUTPATH}/static
cp -a ${BasePath}/app/console/static/* ${OUTPATH}/static/
cp -a ${BasePath}/build/console/resources/* ${OUTPATH}/ cp -a ${BasePath}/build/console/resources/* ${OUTPATH}/
chmod +x ${OUTPATH}/install.sh ${OUTPATH}/run.sh chmod +x ${OUTPATH}/install.sh ${OUTPATH}/run.sh
......
...@@ -166,6 +166,7 @@ CREATE TABLE "goku_gateway_api" ( ...@@ -166,6 +166,7 @@ CREATE TABLE "goku_gateway_api" (
"projectID" integer(11) NOT NULL, "projectID" integer(11) NOT NULL,
"requestURL" text(255) NOT NULL, "requestURL" text(255) NOT NULL,
"apiName" text(255) NOT NULL, "apiName" text(255) NOT NULL,
"alias" text(255),
"requestMethod" text(255) NOT NULL, "requestMethod" text(255) NOT NULL,
"targetServer" text(255), "targetServer" text(255),
"targetURL" text(255), "targetURL" text(255),
...@@ -427,17 +428,17 @@ UPDATE "sqlite_sequence" SET seq = 1 WHERE name = 'goku_admin'; ...@@ -427,17 +428,17 @@ UPDATE "sqlite_sequence" SET seq = 1 WHERE name = 'goku_admin';
-- Indexes structure for table goku_balance -- Indexes structure for table goku_balance
-- ---------------------------- -- ----------------------------
CREATE INDEX "balanceName" CREATE INDEX "balanceName"
ON "goku_balance" ( ON "goku_balance" (
"balanceName" ASC "balanceName" ASC
); );
-- ---------------------------- -- ----------------------------
-- Indexes structure for table goku_cluster -- Indexes structure for table goku_cluster
-- ---------------------------- -- ----------------------------
CREATE INDEX "name" CREATE INDEX "name"
ON "goku_cluster" ( ON "goku_cluster" (
"name" ASC "name" ASC
); );
-- ---------------------------- -- ----------------------------
-- Auto increment value for goku_config_log -- Auto increment value for goku_config_log
......
...@@ -26,16 +26,21 @@ start() { ...@@ -26,16 +26,21 @@ start() {
ADMIN=$1 ADMIN=$1
INSTANCE=$2 INSTANCE=$2
CONFIG_PATH=$WORK_PATH/goku-node.json
if [[ "INSTANCE" = "" ]] ;then RUN_MODEL="console"
PORT=${ENV_INSTANCE} if [ -f "$CONFIG_PATH" ]; then
RUN_MODEL="config"
fi fi
if [[ "$ADMIN" = "" ]] ; then if [[ "$ADMIN" = "" ]] ; then
ADMIN=${ENV_ADMIN} ADMIN=${ENV_ADMIN}
fi fi
if [[ "$ADMIN" = "" ]] ; then if [[ "$INSTANCE" = "" ]]; then
INSTANCE = ${ENV_INSTANCE}
fi
if [[ "$ADMIN" == "" && "$RUN_MODEL" == "console" ]] ; then
echo "start fail :need admin url" echo "start fail :need admin url"
exit 1 exit 1
fi fi
...@@ -43,17 +48,10 @@ start() { ...@@ -43,17 +48,10 @@ start() {
mkdir -p $WORK_PATH/logs mkdir -p $WORK_PATH/logs
echo -e "ENV_PORT=$PORT\nENV_ADMIN=$ADMIN" > $WORK_PATH/$PROG.env echo -e "ENV_PORT=$PORT\nENV_ADMIN=$ADMIN" > $WORK_PATH/$PROG.env
if [[ -e "$WORK_PATH/$PROG.pid" ]]; then if [[ "$ADMIN" != "NULL" ]]; then
## Program is running, exit with error. $PROG_PATH/$PROG --admin=$ADMIN --instance=$INSTANCE
echo "Error! $PROG is currently running!" 1>&2
exit 1
else else
time=$(date "+%Y%m%d-%H%M%S") $PROG_PATH/$PROG --config=$CONFIG_PATH
## Change from /dev/null to something like /var/log/$PROG if you want to save output.
nohup $PROG_PATH/$PROG --instance=$INSTANCE --admin=$ADMIN 2>&1 >"$WORK_PATH/logs/stdout-$PROG-$time.log" & pid=$!
echo "$PROG started"
echo $pid > "$WORK_PATH/$PROG.pid"
fi fi
} }
...@@ -104,3 +102,4 @@ case "$1" in ...@@ -104,3 +102,4 @@ case "$1" in
exit 1 exit 1
;; ;;
esac esac
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册