1
0

del: 移除程序打包service错误

This commit is contained in:
TsMask
2025-01-11 11:37:40 +08:00
parent 6211a88f2e
commit 1fe4eddd33
9 changed files with 4 additions and 324 deletions

View File

@@ -4,36 +4,23 @@ OMCRootDir=/usr/local/omc
SystemdRootDir=/lib/systemd/system
OMCEtcDir=${OMCRootDir}/etc
FERootDir=${OMCRootDir}/htdocs/front
X86Lib64Dir=/lib/x86_64-linux-gnu
OmcBinDir=${OMCRootDir}/bin
OMCStaticDir=${OMCRootDir}/static
UsrLocalBinDir=/usr/local/bin
OmcDaemon=omcd
NginxEtcDir=/etc/nginx
NginxConfDir=${NginxEtcDir}/conf.d
CFileList="restconf.yaml crontask.yaml tasks.yaml sshsvc.yaml capconf.yaml omc.conf"
CFileList="restconf.yaml sshsvc.yaml omc.conf"
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
echo ""
echo "* To start/stop/restart/status omc service, please run:"
echo " sudo systemctl start/stop/restart/status restagent.service"
echo " sudo systemctl start/stop/restart/status crontask.service"
echo " sudo systemctl start/stop/restart/status sshsvc.service"
echo " sudo systemctl start/stop/restart/status captrace.service"
echo " or run: "
echo " sudo /usr/local/omc/bin/omcsvc.sh start/stop/restart/status"
echo ""
cd ${X86Lib64Dir}
chmod +rx libwireshark.so.15.0.12
if [ ! -e libwireshark.so.15 ]; then ln -s libwireshark.so.15.0.12 libwireshark.so.15; fi
if [ ! -e libwireshark.so ]; then ln -s libwireshark.so.15.0.12 libwireshark.so; fi
chmod +rx libwiretap.so.12.0.12
if [ ! -e libwiretap.so.12 ]; then ln -s libwiretap.so.12.0.12 libwiretap.so.12; fi
if [ ! -e libwiretap.so ]; then ln -s libwiretap.so.12.0.12 libwiretap.so; fi
chmod +rx libwsutil.so.13.1.0
if [ ! -e libwsutil.so.13 ]; then ln -s libwsutil.so.13.1.0 libwsutil.so.13; fi
if [ ! -e libwsutil.so ]; then ln -s libwsutil.so.13.1.0 libwsutil.so; fi
cd ${UsrLocalBinDir}
if [ ! -e ${OmcDaemon} ]; then ln -s ${OmcBinDir}/omcsvc.sh ${OmcDaemon}; fi
@@ -82,9 +69,7 @@ systemctl daemon-reload
systemctl disable --now unattended-upgrades
systemctl enable restagent.service
systemctl enable crontask.service
systemctl enable sshsvc.service
systemctl enable captrace.service
systemctl daemon-reload
@@ -105,8 +90,6 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
fi
echo -n "Starting OMC service ... "
systemctl start crontask.service
systemctl start sshsvc.service
systemctl start captrace.service
systemctl start restagent.service
echo "done"

View File

@@ -1,13 +1,5 @@
# !/bin/bash
X86Lib64Dir=/lib/x86_64-linux-gnu
rm -rf ${X86Lib64Dir}/libwireshark.so.15
rm -rf ${X86Lib64Dir}/libwireshark.so
rm -rf ${X86Lib64Dir}/libwiretap.so.12
rm -rf ${X86Lib64Dir}/libwiretap.so
rm -rf ${X86Lib64Dir}/libwsutil.so.13
rm -rf ${X86Lib64Dir}/libwsutil.so
#rm -rf /usr/local/omc
rm -rf /etc/nginx/conf.d/omc.conf
rm -f /usr/local/bin/omcd
@@ -17,15 +9,11 @@ systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi
systemctl disable restagent.service
systemctl disable crontask.service
systemctl disable sshsvc.service
systemctl disable captrace.service
systemctl daemon-reload

View File

@@ -4,9 +4,7 @@ systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
echo "done"
fi