1
0
This commit is contained in:
2023-09-01 12:06:47 +08:00
parent d598077a2e
commit edcafc3688

View File

@@ -38,6 +38,7 @@ cp -f nginx/omc.conf ${RPM_BUILD_ROOT}/etc/nginx/conf.d/
cp -f systemd/restagent.service ${RPM_BUILD_ROOT}/lib/systemd/system/restagent.service
cp -f systemd/crontask.service ${RPM_BUILD_ROOT}/lib/systemd/system/crontask.service
cp -f systemd/sshsvc.service ${RPM_BUILD_ROOT}/lib/systemd/system/sshsvc.service
cp -f systemd/captrace.service ${RPM_BUILD_ROOT}/lib/systemd/system/captrace.service
%build
#cd %{buildroot}/..
@@ -55,6 +56,7 @@ systemctl daemon-reload
systemctl enable restagent.service
systemctl enable crontask.service
systemctl enable sshsvc.service
systemctl enable captrace.service
# 卸载时执行
%postun
@@ -62,11 +64,13 @@ if [ "$1" = "0" ] ; then
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
#rm -rf /usr/local/omc
rm -rf /etc/nginx/conf.d/omc.conf
systemctl disable restagent.service
systemctl disable crontask.service
systemctl disable sshsvc.service
systemctl disable captrace.service
systemctl daemon-reload
else
systemctl daemon-reload
@@ -74,6 +78,7 @@ systemctl restart nginx.service
systemctl restart restagent.service
systemctl restart crontask.service
systemctl restart sshsvc.service
systemctl restart captrace.service
fi
# 规定那些文件必须放入安装程序中,如果没有就报错
@@ -95,4 +100,5 @@ fi
/lib/systemd/system/restagent.service
/lib/systemd/system/crontask.service
/lib/systemd/system/sshsvc.service
/lib/systemd/system/captrace.service