chore: 打包程序restagent变更omc

This commit is contained in:
TsMask
2024-03-19 20:20:12 +08:00
parent a4c71a4d70
commit b01bc44578
84 changed files with 308 additions and 190 deletions

View File

@@ -51,7 +51,7 @@ chmod +rx ${RPM_BUILD_ROOT}/usr/lib64/*
#cp -rf omc/database ${RPM_BUILD_ROOT}/usr/local/omc/
#cp -rf db/* ${RPM_BUILD_ROOT}/usr/local/db/
#cp -f nginx/omc.conf ${RPM_BUILD_ROOT}/etc/nginx/conf.d/
#cp -f systemd/restagent.service ${RPM_BUILD_ROOT}/lib/systemd/system/restagent.service
#cp -f systemd/omc.service ${RPM_BUILD_ROOT}/lib/systemd/system/omc.service
#cp -f systemd/crontask.service ${RPM_BUILD_ROOT}/lib/systemd/system/crontask.service
#cp -f systemd/sshsvc.service ${RPM_BUILD_ROOT}/lib/systemd/system/sshsvc.service
#cp -f systemd/captrace.service ${RPM_BUILD_ROOT}/lib/systemd/system/captrace.service
@@ -110,12 +110,12 @@ if [ ! -e ${OmcDaemon} ]; then ln -s ${OmcBinDir}/omcsvc.sh ${OmcDaemon}; fi
sed -i 's/listen 80;/listen 1080;/g' ${NginxEtcDir}/nginx.conf
sed -i 's/listen \[::\]:80;/listen \[::\]:1080;/g' ${NginxEtcDir}/nginx.conf
systemctl daemon-reload
systemctl enable restagent.service
systemctl enable omc.service
systemctl enable crontask.service
systemctl enable sshsvc.service
systemctl enable captrace.service
systemctl enable adb.service
systemctl stop restagent.service
systemctl stop omc.service
systemctl stop crontask.service
systemctl stop sshsvc.service
systemctl stop captrace.service
@@ -126,7 +126,7 @@ systemctl start nginx.service
systemctl start captrace.service
systemctl start sshsvc.service
systemctl start crontask.service
systemctl start restagent.service
systemctl start omc.service
# 卸载时执行
%postun
@@ -139,7 +139,7 @@ rm libwiretap.so
rm libwsutil.so.13
rm libwsutil.so
if [ "$1" = "0" ] ; then
sudo systemctl stop restagent.service
sudo systemctl stop omc.service
sudo systemctl stop crontask.service
sudo systemctl stop sshsvc.service
sudo systemctl stop captrace.service
@@ -147,7 +147,7 @@ sudo systemctl stop adb.service
sudo systemctl stop nginx.service
#rm -rf /usr/local/omc
rm -rf /etc/nginx/conf.d/omc.conf
sudo systemctl disable restagent.service
sudo systemctl disable omc.service
sudo systemctl disable crontask.service
sudo systemctl disable sshsvc.service
sudo systemctl disable captrace.service
@@ -156,7 +156,7 @@ sudo systemctl daemon-reload
else
sudo systemctl daemon-reload
sudo systemctl stop nginx.service
sudo systemctl stop restagent.service
sudo systemctl stop omc.service
sudo systemctl stop crontask.service
sudo systemctl stop sshsvc.service
sudo systemctl stop captrace.service
@@ -166,7 +166,7 @@ sudo systemctl start adb.service
sudo systemctl start crontask.service
sudo systemctl start sshsvc.service
sudo systemctl start captrace.service
sudo systemctl start restagent.service
sudo systemctl start omc.service
fi
# 规定那些文件必须放入安装程序中,如果没有就报错
@@ -187,7 +187,7 @@ fi
/usr/local/omc/static
/usr/local/db
/etc/nginx/conf.d/omc.conf
/lib/systemd/system/restagent.service
/lib/systemd/system/omc.service
/lib/systemd/system/crontask.service
/lib/systemd/system/sshsvc.service
/lib/systemd/system/captrace.service