From 0bf15fd1647fd61194ecf137a599688587edc85a Mon Sep 17 00:00:00 2001 From: simonzhangsz Date: Thu, 9 Nov 2023 18:59:39 +0800 Subject: [PATCH] fix: nginx default web server port --- rpmbuild/SPECS/omc.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rpmbuild/SPECS/omc.spec b/rpmbuild/SPECS/omc.spec index 0de83e6..50c8ce9 100644 --- a/rpmbuild/SPECS/omc.spec +++ b/rpmbuild/SPECS/omc.spec @@ -70,6 +70,7 @@ UsrLib64Dir=/usr/lib64 OmcBinDir=/usr/local/omc/bin UsrLocalBinDir=/usr/local/bin OmcDaemon=omcd +NginxEtcDir=/etc/nginx CFileList="restconf.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml" for CFile in ${CFileList}; do if [ ! -e "${OMCEtcDir}/${CFile}" ]; then @@ -99,6 +100,8 @@ if [ ! -e libwsutil.so.13 ]; then ln -s libwsutil.so.13.1.0 libwsutil.so.13; fi if [ ! -e libwsutil.so ]; then ln -s libwsutil.so.13.1.0 libwsutil.so; fi cd ${UsrLocalBinDir} if [ ! -e ${OmcDaemon} ]; then ln -s ${OmcBinDir}/omcsvc.sh ${OmcDaemon}; fi +sed -i 's/listen 80;/listen 1080;/g' ${NginxEtcDir}/nginx.conf +sed -i 's/listen [::]:80;/listen [::]:1080;/g' ${NginxEtcDir}/nginx.conf systemctl daemon-reload systemctl enable restagent.service systemctl enable crontask.service @@ -164,7 +167,6 @@ fi /usr/local/omc/database /usr/local/db /etc/nginx/conf.d/omc.conf -/etc/nginx/nginx.conf /lib/systemd/system/restagent.service /lib/systemd/system/crontask.service /lib/systemd/system/sshsvc.service