diff --git a/rpmbuild/SPECS/omc.spec b/rpmbuild/SPECS/omc.spec index 9cc1d65..083c067 100644 --- a/rpmbuild/SPECS/omc.spec +++ b/rpmbuild/SPECS/omc.spec @@ -111,7 +111,7 @@ echo "done" # 卸载时执行 %postun UsrLocalBinDir=/usr/local/bin -rm -f ${UsrLocalBinDir}/omcd +OMCDaemon=omcd if [ "$1" = "0" ] ; then sudo systemctl stop restagent.service @@ -128,6 +128,7 @@ if [ "$1" = "0" ] ; then firewall-cmd --zone=public --remove-port=${Port}/tcp --permanent done firewall-cmd --reload + rm -f ${UsrLocalBinDir}/${OMCDaemon} else sudo systemctl daemon-reload sudo systemctl stop restagent.service