fix: 配置文件修改
This commit is contained in:
@@ -18,11 +18,11 @@ logger:
|
|||||||
# rest agent listen ipv4/v6 and port, support multiple routines
|
# rest agent listen ipv4/v6 and port, support multiple routines
|
||||||
# ip: 0.0.0.0 or ::0, support IPv4/v6
|
# ip: 0.0.0.0 or ::0, support IPv4/v6
|
||||||
rest:
|
rest:
|
||||||
- ipv4: "0.0.0.0"
|
- ipv4: 0.0.0.0
|
||||||
ipv6: ""
|
ipv6: ""
|
||||||
port: 33030
|
port: 33030
|
||||||
schema: http
|
schema: http
|
||||||
- ipv4: "0.0.0.0"
|
- ipv4: 0.0.0.0
|
||||||
ipv6: ""
|
ipv6: ""
|
||||||
port: 33443
|
port: 33443
|
||||||
schema: https
|
schema: https
|
||||||
@@ -33,9 +33,9 @@ webServer:
|
|||||||
enabled: true
|
enabled: true
|
||||||
rootDir: /usr/local/etc/omc/web
|
rootDir: /usr/local/etc/omc/web
|
||||||
listen:
|
listen:
|
||||||
- addr: "0.0.0.0:80"
|
- addr: 0.0.0.0:80
|
||||||
schema: http
|
schema: http
|
||||||
- addr: "0.0.0.0:443"
|
- addr: 0.0.0.0:443
|
||||||
schema: https
|
schema: https
|
||||||
certFile: /usr/local/etc/omc/certs/omc-web.crt
|
certFile: /usr/local/etc/omc/certs/omc-web.crt
|
||||||
keyFile: /usr/local/etc/omc/certs/omc-web.key
|
keyFile: /usr/local/etc/omc/certs/omc-web.key
|
||||||
|
|||||||
65
pkg.sh
65
pkg.sh
@@ -1,65 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# 前端目录
|
|
||||||
WebDir=/root/omc.git/fe.ems.vue3/
|
|
||||||
BuildWeb=""
|
|
||||||
# 当前目录
|
|
||||||
RootDir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
||||||
# 默认版本值
|
|
||||||
VERSION="2.2503.2"
|
|
||||||
|
|
||||||
# usage
|
|
||||||
usage() {
|
|
||||||
echo "Usage: bash $0 [OPTION]"
|
|
||||||
echo
|
|
||||||
echo "Build Software Package OPTION:"
|
|
||||||
echo " -v Specify the version"
|
|
||||||
echo " -web Build Web ($WebDir)"
|
|
||||||
echo " -h Display this help message"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
# Read command line arguments
|
|
||||||
while [[ $# -gt 0 ]]; do
|
|
||||||
case "$1" in
|
|
||||||
-v) VERSION="$2"; shift 2 ;;
|
|
||||||
-web) BuildWeb="build"; shift ;;
|
|
||||||
*) usage ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# =================== Web
|
|
||||||
echo
|
|
||||||
# Determine if -web is passed in
|
|
||||||
if [ -n "$BuildWeb" ]; then
|
|
||||||
cd $WebDir
|
|
||||||
npm install --registry https://registry.npmmirror.com
|
|
||||||
npm run build
|
|
||||||
rm -rf $RootDir/build/linux/usr/local/etc/omc/web
|
|
||||||
cp -rf dist/default/config.js dist/config.js
|
|
||||||
cp -rf dist $RootDir/build/linux/usr/local/etc/omc/web
|
|
||||||
echo "===> web build dist copy to /build/linux/usr/local/etc/omc/web"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# =================== sshsvc
|
|
||||||
echo
|
|
||||||
cd $RootDir/sshsvc
|
|
||||||
make
|
|
||||||
|
|
||||||
cp -rf sshsvc $RootDir/build/linux/usr/local/bin/sshsvc
|
|
||||||
echo "===> go build sshsvc copy to /build/linux/usr/local/bin"
|
|
||||||
|
|
||||||
|
|
||||||
# =================== omc
|
|
||||||
echo
|
|
||||||
cd $RootDir
|
|
||||||
MOD_CONFIG="be.ems/src/framework/config"
|
|
||||||
go build -o omc -v -ldflags "-s -w -X '$MOD_CONFIG.Version=$VERSION' -X '$MOD_CONFIG.BuildTime=$(date)' -X '$MOD_CONFIG.GoVer=$(go version)'"
|
|
||||||
|
|
||||||
cp -rf omc $RootDir/build/linux/usr/local/bin/omc
|
|
||||||
echo "===> go build omc copy to /build/linux/usr/local/bin"
|
|
||||||
|
|
||||||
|
|
||||||
# =================== deb/rpm
|
|
||||||
echo
|
|
||||||
bash $RootDir/build/build.sh -v $VERSION
|
|
||||||
Reference in New Issue
Block a user