1
0

fix: stop service at the begin install

This commit is contained in:
2024-09-04 16:13:15 +08:00
parent 8d3dccbeef
commit 8a63fb0173

View File

@@ -60,6 +60,14 @@ chmod +rx ${RPM_BUILD_ROOT}/usr/lib64/*
#cd %{buildroot}/..
#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
OmcRootDir=/usr/local/omc
@@ -135,13 +143,6 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
fi
fi
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
echo -n "Starting OMC service ... "
systemctl start captrace.service
systemctl start sshsvc.service