1
0

fix: deb安装前systemctl stop的操作判断

This commit is contained in:
TsMask
2024-09-21 12:11:47 +08:00
parent ac25c16e74
commit 1c565bdd61
4 changed files with 26 additions and 24 deletions

View File

@@ -100,8 +100,8 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
fi
echo -n "Starting OMC service ... "
systemctl restart crontask.service
systemctl restart sshsvc.service
systemctl restart captrace.service
systemctl restart restagent.service
systemctl start crontask.service
systemctl start sshsvc.service
systemctl start captrace.service
systemctl start restagent.service
echo "done"

View File

@@ -1,18 +1,19 @@
# !/bin/bash
FERootDir=/usr/local/omc/htdocs/front
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
fi
echo "done"
FERootDir=/usr/local/omc/htdocs/front
# apt-get install zip
# clear front-end old hash js files
rm -rf ${FERootDir}/assets
rm -rf ${FERootDir}/js
rm -rf ${FERootDir}/index.*.js

View File

@@ -100,8 +100,8 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
fi
echo -n "Starting OMC service ... "
systemctl restart crontask.service
systemctl restart sshsvc.service
systemctl restart captrace.service
systemctl restart restagent.service
systemctl start crontask.service
systemctl start sshsvc.service
systemctl start captrace.service
systemctl start restagent.service
echo "done"

View File

@@ -1,18 +1,19 @@
# !/bin/bash
FERootDir=/usr/local/omc/htdocs/front
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
fi
echo "done"
FERootDir=/usr/local/omc/htdocs/front
# apt-get install zip
# clear front-end old hash js files
rm -rf ${FERootDir}/assets
rm -rf ${FERootDir}/js
rm -rf ${FERootDir}/index.*.js