diff --git a/rpmbuild/SPECS/omc.spec b/rpmbuild/SPECS/omc.spec index 1c3aadc..3be76bb 100644 --- a/rpmbuild/SPECS/omc.spec +++ b/rpmbuild/SPECS/omc.spec @@ -61,12 +61,7 @@ chmod +rx ${RPM_BUILD_ROOT}/usr/lib64/* #make %install -echo -n "Stopping OMC service ... " -systemctl stop restagent.service -systemctl stop crontask.service -systemctl stop sshsvc.service -systemctl stop captrace.service -echo "done" + # 安装完成后执行 %post @@ -81,6 +76,14 @@ OmcDaemon=omcd NginxEtcDir=/etc/nginx CFileList="restconf.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml omc.conf" LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png" + +echo -n "Stopping OMC service ... " +systemctl stop restagent.service +systemctl stop crontask.service +systemctl stop sshsvc.service +systemctl stop captrace.service +echo "done" + for CFile in ${CFileList}; do if [ ! -e "${OMCEtcDir}/${CFile}" ]; then cp -f ${OMCEtcDir}/default/${CFile} ${OMCEtcDir}