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