From 6add6a7823c800e2a5f1ff66f4c20d539b7b6b9d Mon Sep 17 00:00:00 2001 From: miraclesu Date: Tue, 16 May 2017 10:02:13 +0800 Subject: [PATCH] fix build script --- README.md | 2 +- build.sh | 6 ++++-- conf/files/db.json.sample | 2 +- conf/files/etcd.json.sample | 4 +--- conf/files/mail.json.sample | 2 +- conf/files/security.json.sample | 2 +- conf/files/web.json.sample | 6 +++--- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d8a2de6..53107a1 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ sh ./build.sh 1. 安装 [MongoDB](http://docs.mongodb.org/manual/installation/) 2. 安装 [etcd](https://github.com/coreos/etcd) 3. 修改 `conf` 相关的配置 -4. 在任务结点启动 `./node -conf conf/base.json`,在管理结点启动 `./web -conf conf/base.json` +4. 在任务结点启动 `./cronnode -conf conf/base.json`,在管理结点启动 `./cronweb -conf conf/base.json` 5. 访问管理界面 `http://127.0.0.1:7079/ui/` ## Screenshot diff --git a/build.sh b/build.sh index aa2922b..b91e585 100644 --- a/build.sh +++ b/build.sh @@ -13,11 +13,13 @@ echo "build file to ./$out" mkdir -p "$out/conf" -go build -o ./$out/node ./bin/node/server.go +go build -o ./$out/cronnode ./bin/node/server.go check_code -go build -o ./$out/web ./bin/web/server.go +go build -o ./$out/cronweb ./bin/web/server.go check_code +cp -r web/ui/dist "$out/ui" + sources=`find ./conf/files -name "*.json.sample"` check_code for source in $sources;do diff --git a/conf/files/db.json.sample b/conf/files/db.json.sample index f53d66a..327d72c 100644 --- a/conf/files/db.json.sample +++ b/conf/files/db.json.sample @@ -5,4 +5,4 @@ "Database": "cronsun", "#Timeout": "connect timeout duration/second", "Timeout": 15 -} \ No newline at end of file +} diff --git a/conf/files/etcd.json.sample b/conf/files/etcd.json.sample index 60c4a26..c819385 100644 --- a/conf/files/etcd.json.sample +++ b/conf/files/etcd.json.sample @@ -1,8 +1,6 @@ { "Endpoints":[ - "http://192.168.11.27:2389", - "http://192.168.11.28:2389", - "http://192.168.11.29:2389" + "http://127.0.0.1:2389" ], "Username":"", "Password":"", diff --git a/conf/files/mail.json.sample b/conf/files/mail.json.sample index c5076f6..5b00075 100644 --- a/conf/files/mail.json.sample +++ b/conf/files/mail.json.sample @@ -11,4 +11,4 @@ "Password": "nbhh", "SSL": false, "LocalName": "sendmail@nb.com" -} \ No newline at end of file +} diff --git a/conf/files/security.json.sample b/conf/files/security.json.sample index e33d63d..cb533d0 100644 --- a/conf/files/security.json.sample +++ b/conf/files/security.json.sample @@ -6,4 +6,4 @@ "ext": [ ".sh", ".py" ] -} \ No newline at end of file +} diff --git a/conf/files/web.json.sample b/conf/files/web.json.sample index 6f72cc4..8a6a80b 100644 --- a/conf/files/web.json.sample +++ b/conf/files/web.json.sample @@ -1,5 +1,5 @@ { "BindAddr": ":7079", - "#UIDir": "为空使用默认的后台界面" - "UIDir": "" -} \ No newline at end of file + "#UIDir": "为空使用默认的后台界面", + "UIDir": "ui" +}