1
0

fix: omc.spec update

This commit is contained in:
2024-01-10 17:12:15 +08:00
parent 81e254ab76
commit 6c72779483

View File

@@ -68,10 +68,12 @@ OMCEtcDir=/usr/local/omc/etc
FERootDir=/usr/local/omc/htdocs/front
UsrLib64Dir=/usr/lib64
OmcBinDir=/usr/local/omc/bin
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"
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
for CFile in ${CFileList}; do
if [ ! -e "${OMCEtcDir}/${CFile}" ]; then
cp ${OMCEtcDir}/default/${CFile} ${OMCEtcDir};
@@ -83,6 +85,11 @@ else
sed -i 's/replica-read-only yes/replica-read-only no/g' ${RedisConfDir}/redis.conf
fi
if [ ! -e "${FERootDir}/config.js" ]; then cp ${FERootDir}/default/config.js ${FERootDir}; fi
for LogoFile in ${LogoFileList}; do
if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
cp ${OMCStaticDir}/agt.d/logo/${LogoFile} ${OMCStaticDir}/logo;
fi
done
if ! id -u omc >/dev/null 2>&1 ; then useradd -d /opt/omc -m -s /bin/bash -p1000ftp@kp omc; else echo "user omc exist"; fi
mkdir -p /opt/omc/ftp
mkdir -p /opt/omc/ftp/log