上传配置
This commit is contained in:
parent
d5ac3f986e
commit
9001224d4a
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,6 +26,7 @@ pb.bat
|
||||
cmd/v2/.cache.meta
|
||||
cmd/v2/my.db
|
||||
.idea/
|
||||
bin/
|
||||
bin/cross.json
|
||||
bin/gm.json
|
||||
bin/cmd
|
||||
|
@ -1,8 +1,18 @@
|
||||
CGO_ENABLED=0
|
||||
GO111MODULE=on
|
||||
#!/bin/sh
|
||||
GO_ENABLED=0
|
||||
GO111MODULE=on
|
||||
GOOS=linux
|
||||
cd ../
|
||||
go build -o ./bin/cmd ./services/cmd/main.go
|
||||
go build -o ./bin/mainte ./services/mainte/main.go
|
||||
go build -o ./bin/gateway ./services/gateway/main.go
|
||||
go build -o ./bin/worker ./services/worker/main.go
|
||||
curl -XPOST -s -L 'https://oapi.dingtalk.com/robot/send?access_token=5ae6b8eacb8f065c6b6c8211febaf024a4179652b82c4c2ad59a8878cecee5e4' -H 'Content-Type: application/json' -H "charset:utf-8" -d '{"msgtype": "text",
|
||||
|
||||
"text": {
|
||||
|
||||
"content": "服务构建完成"
|
||||
|
||||
}
|
||||
|
||||
}'
|
||||
|
44
bin/start.sh
44
bin/start.sh
@ -1,9 +1,49 @@
|
||||
#!/bin/sh
|
||||
curl -XPOST -s -L 'https://oapi.dingtalk.com/robot/send?access_token=5ae6b8eacb8f065c6b6c8211febaf024a4179652b82c4c2ad59a8878cecee5e4' -H 'Content-Type: application/json' -H "charset:utf-8" -d '{"msgtype": "text",
|
||||
|
||||
"text": {
|
||||
|
||||
"content": " 服务正在启动"
|
||||
|
||||
}
|
||||
|
||||
}'
|
||||
curl -XPOST -s -L 'https://oapi.dingtalk.com/robot/send?access_token=e15fc4f867d6b83336eb720f70d0fb66de1dab49da944f33478d8e619f35c2ac' -H 'Content-Type: application/json' -H "charset:utf-8" -d '{"msgtype": "text",
|
||||
|
||||
"text": {
|
||||
|
||||
"content": "* 服务正在启动"
|
||||
|
||||
}
|
||||
|
||||
}'
|
||||
./stup.sh start dfcross_1_worker0 worker ./conf/dfcross_1_worker0.yaml
|
||||
sleep 1
|
||||
./stup.sh start dfcross_1_mainte mainte ./conf/dfcross_1_mainte.yaml
|
||||
sleep 1
|
||||
./stup.sh start df01_mainte mainte ./conf/df01_mainte.yaml
|
||||
sleep 1
|
||||
./stup.sh start df01_worker0 worker ./conf/df01_worker0.yaml
|
||||
./stup.sh start df01_worker0 worker ./conf/df01_worker0.yaml
|
||||
sleep 1
|
||||
./stup.sh start df01_gateway0 gateway ./conf/df01_gateway0.yaml
|
||||
./stup.sh start df01_gateway0 gateway ./conf/df01_gateway0.yaml
|
||||
|
||||
sleep 1
|
||||
curl -XPOST -s -L 'https://oapi.dingtalk.com/robot/send?access_token=5ae6b8eacb8f065c6b6c8211febaf024a4179652b82c4c2ad59a8878cecee5e4' -H 'Content-Type: application/json' -H "charset:utf-8" -d '{"msgtype": "text",
|
||||
|
||||
"text": {
|
||||
|
||||
"content": " 服务启动完成"
|
||||
|
||||
}
|
||||
|
||||
}'
|
||||
|
||||
curl -XPOST -s -L 'https://oapi.dingtalk.com/robot/send?access_token=e15fc4f867d6b83336eb720f70d0fb66de1dab49da944f33478d8e619f35c2ac' -H 'Content-Type: application/json' -H "charset:utf-8" -d '{"msgtype": "text",
|
||||
|
||||
"text": {
|
||||
|
||||
"content": "* 服务启动完成"
|
||||
|
||||
}
|
||||
|
||||
}'
|
||||
|
22
bin/stop.sh
22
bin/stop.sh
@ -1,4 +1,24 @@
|
||||
./stup.sh stop df01_gateway0
|
||||
#!/bin/sh
|
||||
curl -XPOST -s -L 'https://oapi.dingtalk.com/robot/send?access_token=5ae6b8eacb8f065c6b6c8211febaf024a4179652b82c4c2ad59a8878cecee5e4' -H 'Content-Type: application/json' -H "charset:utf-8" -d '{"msgtype": "text",
|
||||
|
||||
"text": {
|
||||
|
||||
"content": " 服务停止"
|
||||
|
||||
}
|
||||
|
||||
}'
|
||||
|
||||
curl -XPOST -s -L 'https://oapi.dingtalk.com/robot/send?access_token=e15fc4f867d6b83336eb720f70d0fb66de1dab49da944f33478d8e619f35c2ac' -H 'Content-Type: application/json' -H "charset:utf-8" -d '{"msgtype": "text",
|
||||
|
||||
"text": {
|
||||
|
||||
"content": "* 服务停止"
|
||||
|
||||
}
|
||||
|
||||
}'
|
||||
./stup.sh stop df01_gateway0
|
||||
|
||||
./stup.sh stop df01_mainte
|
||||
|
||||
|
@ -7,8 +7,8 @@
|
||||
num=`ps -ef | grep conf | grep $SERVICE | grep -v grep | grep -v /bin/bash | wc -l`
|
||||
if [ $num -eq 0 ]
|
||||
then
|
||||
nohup $CMD > /dev/null 2>&1 &
|
||||
# nohup $CMD > $SERVICE.log 2>&1 &
|
||||
# nohup $CMD > /dev/null 2>&1 &
|
||||
nohup $CMD > $SERVICE.log 2>&1 &
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "start failed, please check the log!"
|
||||
|
Loading…
Reference in New Issue
Block a user