1
0

fix: deb卸载systemctl操作判断

This commit is contained in:
TsMask
2024-09-21 16:32:23 +08:00
parent 586b4c2f5a
commit eea255ff95
2 changed files with 22 additions and 20 deletions

View File

@@ -9,22 +9,23 @@ rm -rf ${X86Lib64Dir}/libwsutil.so.13
rm -rf ${X86Lib64Dir}/libwsutil.so rm -rf ${X86Lib64Dir}/libwsutil.so
#rm -rf /usr/local/omc #rm -rf /usr/local/omc
rm -rf /usr/local/etc/omc
rm -rf /etc/nginx/conf.d/omc.conf rm -rf /etc/nginx/conf.d/omc.conf
rm -f /usr/local/bin/omcd rm -f /usr/local/bin/omcd
echo -n "Stopping OMC service ... " systemctl daemon-reload
systemctl stop restagent.service
systemctl stop crontask.service if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
systemctl stop sshsvc.service echo -n "Stopping OMC service ... "
systemctl stop captrace.service systemctl stop restagent.service
echo "done" systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi
echo -n "Disable OMC service ... "
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 disable captrace.service
echo "done"
systemctl daemon-reload systemctl daemon-reload

View File

@@ -9,22 +9,23 @@ rm -rf ${X86Lib64Dir}/libwsutil.so.13
rm -rf ${X86Lib64Dir}/libwsutil.so rm -rf ${X86Lib64Dir}/libwsutil.so
#rm -rf /usr/local/omc #rm -rf /usr/local/omc
rm -rf /usr/local/etc/omc
rm -rf /etc/nginx/conf.d/omc.conf rm -rf /etc/nginx/conf.d/omc.conf
rm -f /usr/local/bin/omcd rm -f /usr/local/bin/omcd
echo -n "Stopping OMC service ... " systemctl daemon-reload
systemctl stop restagent.service
systemctl stop crontask.service if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
systemctl stop sshsvc.service echo -n "Stopping OMC service ... "
systemctl stop captrace.service systemctl stop restagent.service
echo "done" systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi
echo -n "Disable OMC service ... "
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 disable captrace.service
echo "done"
systemctl daemon-reload systemctl daemon-reload