From 7e8360dcb40173e1e8e8008ca52560c08d6dfbce Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 19 Mar 2024 20:25:59 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=89=93=E5=8C=85restconf.yaml?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E6=94=B9=E5=90=8Domc.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- build.sh | 2 +- build/debbuild/DEBIAN/postinst | 2 +- build/misc/setomc.sh | 2 +- build/rpmbuild/SPECS/omc.spec | 2 +- omc/config/config.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1f2569a..eb4f8ad 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ cd ./omc go mod download # 调试启动 -go run omc.go -c ./omc/etc/restconf.yaml --env local +go run omc.go -c ./omc/etc/omc.yaml --env local # 打包命名 omc go build -ldflags="-s -w" -o omc diff --git a/build.sh b/build.sh index c9fad17..c4b7430 100644 --- a/build.sh +++ b/build.sh @@ -156,7 +156,7 @@ case "$1" in # cp -rf ${EmsBEDir}/build/build/systemd/*.service ${DebBuildDir}/lib/systemd/system/ chmod +x ${DebBuildDir}/usr/local/omc/bin/* sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control - perl -0777 -i -pe 's/ne:\n user: root/ne:\n user: agtuser/g' ${DebBuildDir}/usr/local/omc/etc/default/restconf.yaml + perl -0777 -i -pe 's/ne:\n user: root/ne:\n user: agtuser/g' ${DebBuildDir}/usr/local/omc/etc/default/omc.yaml dpkg -b ${DebBuildDir} ${ReleaseDebs}/${DebPkgFile} cd $ReleaseDir/"$1"s/$RelArch diff --git a/build/debbuild/DEBIAN/postinst b/build/debbuild/DEBIAN/postinst index 40d056e..01435eb 100644 --- a/build/debbuild/DEBIAN/postinst +++ b/build/debbuild/DEBIAN/postinst @@ -11,7 +11,7 @@ OmcDaemon=omcd NginxEtcDir=/etc/nginx NginxConfDir=${NginxEtcDir}/conf.d NginxSiteAvailable=${NginxEtcDir}/sites-available -CFileList="restconf.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml" +CFileList="omc.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml" LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png" echo "" diff --git a/build/misc/setomc.sh b/build/misc/setomc.sh index 2b994cb..0bbe94b 100644 --- a/build/misc/setomc.sh +++ b/build/misc/setomc.sh @@ -50,7 +50,7 @@ case "${M_ARG}" in done cp -rf ${CustomizedDir}/logo/* ${OMCStaticDir}/logo cp -rf ${CustomizedDir}/doc/* ${OMCStaticDir}/helpDoc - perl -0777 -i -pe 's/agtuser/bluearcus/g' ${OMCRootDir}/etc/default/restconf.yaml + perl -0777 -i -pe 's/agtuser/bluearcus/g' ${OMCRootDir}/etc/default/omc.yaml perl -0777 -i -pe 's/agtuser/bluearcus/g' ${OMCBinDir}/nehosts fi ;; diff --git a/build/rpmbuild/SPECS/omc.spec b/build/rpmbuild/SPECS/omc.spec index b1ba6ff..85b6cf4 100644 --- a/build/rpmbuild/SPECS/omc.spec +++ b/build/rpmbuild/SPECS/omc.spec @@ -72,7 +72,7 @@ OMCStaticDir=/usr/local/omc/static UsrLocalBinDir=/usr/local/bin OmcDaemon=omcd NginxEtcDir=/etc/nginx -CFileList="restconf.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml" +CFileList="omc.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml" LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png" for CFile in ${CFileList}; do if [ ! -e "${OMCEtcDir}/${CFile}" ]; then diff --git a/omc/config/config.go b/omc/config/config.go index 3abb5f0..63e5f6b 100644 --- a/omc/config/config.go +++ b/omc/config/config.go @@ -326,7 +326,7 @@ func GetDefaultUserAgent() string { return "OMC/" + global.Version } -// const defaultConfigFile = "./etc/restconf.yaml" +// const defaultConfigFile = "./etc/omc.yaml" // func init() { // cfile := flag.String("c", defaultConfigFile, "config file")