chore: 打包restconf.yaml配置文件改名omc.yaml
This commit is contained in:
@@ -30,7 +30,7 @@ cd ./omc
|
|||||||
go mod download
|
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
|
# 打包命名 omc
|
||||||
go build -ldflags="-s -w" -o omc
|
go build -ldflags="-s -w" -o omc
|
||||||
|
|||||||
2
build.sh
2
build.sh
@@ -156,7 +156,7 @@ case "$1" in
|
|||||||
# cp -rf ${EmsBEDir}/build/build/systemd/*.service ${DebBuildDir}/lib/systemd/system/
|
# cp -rf ${EmsBEDir}/build/build/systemd/*.service ${DebBuildDir}/lib/systemd/system/
|
||||||
chmod +x ${DebBuildDir}/usr/local/omc/bin/*
|
chmod +x ${DebBuildDir}/usr/local/omc/bin/*
|
||||||
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
|
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}
|
dpkg -b ${DebBuildDir} ${ReleaseDebs}/${DebPkgFile}
|
||||||
|
|
||||||
cd $ReleaseDir/"$1"s/$RelArch
|
cd $ReleaseDir/"$1"s/$RelArch
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ OmcDaemon=omcd
|
|||||||
NginxEtcDir=/etc/nginx
|
NginxEtcDir=/etc/nginx
|
||||||
NginxConfDir=${NginxEtcDir}/conf.d
|
NginxConfDir=${NginxEtcDir}/conf.d
|
||||||
NginxSiteAvailable=${NginxEtcDir}/sites-available
|
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"
|
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ case "${M_ARG}" in
|
|||||||
done
|
done
|
||||||
cp -rf ${CustomizedDir}/logo/* ${OMCStaticDir}/logo
|
cp -rf ${CustomizedDir}/logo/* ${OMCStaticDir}/logo
|
||||||
cp -rf ${CustomizedDir}/doc/* ${OMCStaticDir}/helpDoc
|
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
|
perl -0777 -i -pe 's/agtuser/bluearcus/g' ${OMCBinDir}/nehosts
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ OMCStaticDir=/usr/local/omc/static
|
|||||||
UsrLocalBinDir=/usr/local/bin
|
UsrLocalBinDir=/usr/local/bin
|
||||||
OmcDaemon=omcd
|
OmcDaemon=omcd
|
||||||
NginxEtcDir=/etc/nginx
|
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"
|
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
|
||||||
for CFile in ${CFileList}; do
|
for CFile in ${CFileList}; do
|
||||||
if [ ! -e "${OMCEtcDir}/${CFile}" ]; then
|
if [ ! -e "${OMCEtcDir}/${CFile}" ]; then
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ func GetDefaultUserAgent() string {
|
|||||||
return "OMC/" + global.Version
|
return "OMC/" + global.Version
|
||||||
}
|
}
|
||||||
|
|
||||||
// const defaultConfigFile = "./etc/restconf.yaml"
|
// const defaultConfigFile = "./etc/omc.yaml"
|
||||||
|
|
||||||
// func init() {
|
// func init() {
|
||||||
// cfile := flag.String("c", defaultConfigFile, "config file")
|
// cfile := flag.String("c", defaultConfigFile, "config file")
|
||||||
|
|||||||
Reference in New Issue
Block a user