refactor control
This commit is contained in:
parent
ae705e1b40
commit
f16315328b
52
control
52
control
|
@ -15,13 +15,13 @@ usage()
|
|||
start_all()
|
||||
{
|
||||
test -x n9e-rdb && start rdb
|
||||
test -x n9e-transfer && start transfer
|
||||
test -x n9e-tsdb && start tsdb
|
||||
test -x n9e-index && start index
|
||||
test -x n9e-judge && start judge
|
||||
test -x n9e-monapi && start monapi
|
||||
test -x n9e-job && start job
|
||||
test -x n9e-ams && start ams
|
||||
test -x n9e-monapi && start monapi
|
||||
test -x n9e-tsdb && start tsdb
|
||||
test -x n9e-index && start index
|
||||
test -x n9e-transfer && start transfer
|
||||
test -x n9e-judge && start judge
|
||||
test -x n9e-agent && start agent
|
||||
}
|
||||
|
||||
|
@ -67,12 +67,12 @@ start()
|
|||
|
||||
stop_all()
|
||||
{
|
||||
test -x n9e-monapi && stop monapi
|
||||
test -x n9e-transfer && stop transfer
|
||||
test -x n9e-tsdb && stop tsdb
|
||||
test -x n9e-index && stop index
|
||||
test -x n9e-judge && stop judge
|
||||
test -x n9e-agent && stop agent
|
||||
test -x n9e-judge && stop judge
|
||||
test -x n9e-transfer && stop transfer
|
||||
test -x n9e-index && stop index
|
||||
test -x n9e-tsdb && stop tsdb
|
||||
test -x n9e-monapi && stop monapi
|
||||
test -x n9e-ams && stop ams
|
||||
test -x n9e-job && stop job
|
||||
test -x n9e-rdb && stop rdb
|
||||
|
@ -142,12 +142,6 @@ build_one()
|
|||
go build -ldflags "-X main.version=${version}" -o n9e-${mod} src/modules/${mod}/${mod}.go
|
||||
}
|
||||
|
||||
build_docker()
|
||||
{
|
||||
mod=$1
|
||||
go build -ldflags "-X main.version=${version}" -o bin/n9e-${mod} src/modules/${mod}/${mod}.go
|
||||
}
|
||||
|
||||
build()
|
||||
{
|
||||
export GO111MODULE=on
|
||||
|
@ -166,19 +160,6 @@ build()
|
|||
return
|
||||
fi
|
||||
|
||||
if [ "x${mod}" = "xdocker" ]; then
|
||||
build_docker monapi
|
||||
build_docker transfer
|
||||
build_docker index
|
||||
build_docker judge
|
||||
build_docker agent
|
||||
build_docker tsdb
|
||||
build_docker rdb
|
||||
build_docker ams
|
||||
build_docker job
|
||||
return
|
||||
fi
|
||||
|
||||
build_one $mod
|
||||
}
|
||||
|
||||
|
@ -196,18 +177,7 @@ reload()
|
|||
|
||||
pack()
|
||||
{
|
||||
v=$1
|
||||
if [ "x${v}" = "x" ]; then
|
||||
v=$(date +%Y-%m-%d-%H-%M-%S)
|
||||
fi
|
||||
|
||||
tar zcvf n9e-$v.tar.gz control sql pub etc/service etc/nginx.conf etc/mysql.yml etc/address.yml \
|
||||
n9e-agent etc/agent.yml \
|
||||
n9e-tsdb etc/tsdb.yml \
|
||||
n9e-index etc/index.yml \
|
||||
n9e-judge etc/judge.yml \
|
||||
n9e-transfer etc/transfer.yml \
|
||||
n9e-monapi etc/monapi.yml
|
||||
tar zcvf n9e-${version}.tar.gz control sql etc
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
|
Loading…
Reference in New Issue