fix: deb卸载systemctl操作判断
This commit is contained in:
@@ -1,26 +1,30 @@
|
|||||||
# !/bin/bash
|
# !/bin/bash
|
||||||
|
|
||||||
X86Lib64Dir=/lib/x86_64-linux-gnu
|
X86Lib64Dir=/lib/x86_64-linux-gnu
|
||||||
cd ${X86Lib64Dir}
|
rm -rf ${X86Lib64Dir}/libwireshark.so.15
|
||||||
rm libwireshark.so.15
|
rm -rf ${X86Lib64Dir}/libwireshark.so
|
||||||
rm libwireshark.so
|
rm -rf ${X86Lib64Dir}/libwiretap.so.12
|
||||||
rm libwiretap.so.12
|
rm -rf ${X86Lib64Dir}/libwiretap.so
|
||||||
rm libwiretap.so
|
rm -rf ${X86Lib64Dir}/libwsutil.so.13
|
||||||
rm libwsutil.so.13
|
rm -rf ${X86Lib64Dir}/libwsutil.so
|
||||||
rm 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 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
|
systemctl stop captrace.service
|
||||||
|
echo "done"
|
||||||
|
|
||||||
|
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
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
# !/bin/bash
|
# !/bin/bash
|
||||||
|
|
||||||
echo -n "Stopping OMC service ... "
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
|
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
|
||||||
|
echo -n "Stopping OMC service ... "
|
||||||
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
|
systemctl stop captrace.service
|
||||||
|
echo "done"
|
||||||
fi
|
fi
|
||||||
echo "done"
|
|
||||||
|
|
||||||
FERootDir=/usr/local/omc/htdocs/front
|
FERootDir=/usr/local/omc/htdocs/front
|
||||||
|
|
||||||
|
|||||||
@@ -1,26 +1,30 @@
|
|||||||
# !/bin/bash
|
# !/bin/bash
|
||||||
|
|
||||||
X86Lib64Dir=/lib/x86_64-linux-gnu
|
X86Lib64Dir=/lib/x86_64-linux-gnu
|
||||||
cd ${X86Lib64Dir}
|
rm -rf ${X86Lib64Dir}/libwireshark.so.15
|
||||||
rm libwireshark.so.15
|
rm -rf ${X86Lib64Dir}/libwireshark.so
|
||||||
rm libwireshark.so
|
rm -rf ${X86Lib64Dir}/libwiretap.so.12
|
||||||
rm libwiretap.so.12
|
rm -rf ${X86Lib64Dir}/libwiretap.so
|
||||||
rm libwiretap.so
|
rm -rf ${X86Lib64Dir}/libwsutil.so.13
|
||||||
rm libwsutil.so.13
|
rm -rf ${X86Lib64Dir}/libwsutil.so
|
||||||
rm 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 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
|
systemctl stop captrace.service
|
||||||
|
echo "done"
|
||||||
|
|
||||||
|
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
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
# !/bin/bash
|
# !/bin/bash
|
||||||
|
|
||||||
echo -n "Stopping OMC service ... "
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
|
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
|
||||||
|
echo -n "Stopping OMC service ... "
|
||||||
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
|
systemctl stop captrace.service
|
||||||
|
echo "done"
|
||||||
fi
|
fi
|
||||||
echo "done"
|
|
||||||
|
|
||||||
FERootDir=/usr/local/omc/htdocs/front
|
FERootDir=/usr/local/omc/htdocs/front
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user