new version for 5GC
This commit is contained in:
0
build/omc/backup/.gitkeep
Normal file
0
build/omc/backup/.gitkeep
Normal file
0
build/omc/bin/.gitkeep
Normal file
0
build/omc/bin/.gitkeep
Normal file
0
build/omc/database/.gitkeep
Normal file
0
build/omc/database/.gitkeep
Normal file
0
build/omc/htdocs/front/.gitkeep
Normal file
0
build/omc/htdocs/front/.gitkeep
Normal file
0
build/omc/license/.gitkeep
Normal file
0
build/omc/license/.gitkeep
Normal file
0
build/omc/mmlhome/.gitkeep
Normal file
0
build/omc/mmlhome/.gitkeep
Normal file
0
build/omc/mmllog/.gitkeep
Normal file
0
build/omc/mmllog/.gitkeep
Normal file
0
build/omc/software/.gitkeep
Normal file
0
build/omc/software/.gitkeep
Normal file
0
build/omc/upload/.gitkeep
Normal file
0
build/omc/upload/.gitkeep
Normal file
@@ -1,16 +0,0 @@
|
||||
[Unit]
|
||||
Description=4A agent daemon
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
LimitNOFILE=65535
|
||||
|
||||
Restart=always
|
||||
ExecStart=/usr/local/omc/run/4a_agent -c /usr/local/omc/etc/4a_agent.yaml
|
||||
RestartSec=2
|
||||
RestartPreventExitStatus=1
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,16 +0,0 @@
|
||||
[Unit]
|
||||
Description=NBI agent daemon
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
LimitNOFILE=65535
|
||||
|
||||
Restart=always
|
||||
ExecStart=/usr/local/omc/run/nbi_agent -c /usr/local/omc/etc/nbi_agent.json
|
||||
RestartSec=2
|
||||
RestartPreventExitStatus=1
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,16 +0,0 @@
|
||||
[Unit]
|
||||
Description=NBI alarm agent daemon
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
LimitNOFILE=65535
|
||||
|
||||
Restart=always
|
||||
ExecStart=/usr/local/omc/run/nbi_alarm -c /usr/local/omc/etc/nbi_alarm.json
|
||||
RestartSec=2
|
||||
RestartPreventExitStatus=1
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,9 +1,12 @@
|
||||
# !/bin/bash
|
||||
systemctl stop nginx.service
|
||||
|
||||
#systemctl stop nginx.service
|
||||
systemctl stop restagent.service
|
||||
systemctl stop crontask.service
|
||||
systemctl stop sshsvc.service
|
||||
#rm -rf /usr/local/omc
|
||||
rm -rf /etc/nginx/conf.d/omc.conf
|
||||
#rm -rf /etc/nginx/conf.d/omc.conf
|
||||
systemctl disable restagent.service
|
||||
systemctl disable crontask.service
|
||||
systemctl disable sshsvc.service
|
||||
systemctl daemon-reload
|
||||
@@ -3,16 +3,16 @@
|
||||
%define __arch_install_post %{nil}
|
||||
|
||||
Name: OMC
|
||||
Summary: Ruijie 5GC OMC
|
||||
Version: 5GC16.1.1
|
||||
Release: 20230531
|
||||
Vendor: RuijIe Network
|
||||
URL: https://www.ruijie.com.cn/
|
||||
Summary: AGrandTech 5GC OMC
|
||||
Version: 1.0.0
|
||||
Release: 20230901
|
||||
Vendor: AGrandTech
|
||||
URL: https://www.agrandtech.com/
|
||||
License: commercial
|
||||
Group: Applications/Communications
|
||||
#BuildRoot: $PWD/rpmoutput
|
||||
%description
|
||||
Ruijie's 5GC OMC
|
||||
AGrandTech's 5GC OMC
|
||||
|
||||
%prep
|
||||
mkdir -p ${RPM_BUILD_ROOT}
|
||||
@@ -39,9 +39,6 @@ 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/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/nbi_alarm.service ${RPM_BUILD_ROOT}/lib/systemd/system/nbi_alarm.service
|
||||
cp -f systemd/nbi_agent.service ${RPM_BUILD_ROOT}/lib/systemd/system/nbi_agent.service
|
||||
cp -f systemd/4a_agent.service ${RPM_BUILD_ROOT}/lib/systemd/system/4a_agent.service
|
||||
|
||||
%build
|
||||
#cd %{buildroot}/..
|
||||
@@ -60,30 +57,18 @@ systemctl daemon-reload
|
||||
systemctl enable restagent.service
|
||||
systemctl enable crontask.service
|
||||
systemctl enable sshsvc.service
|
||||
systemctl enable nbi_alarm.service
|
||||
systemctl enable nbi_agent.service
|
||||
systemctl enable 4a_agent.service
|
||||
systemctl enable nginx.service
|
||||
systemctl restart nginx.service
|
||||
|
||||
# 卸载时执行
|
||||
%postun
|
||||
if [ "$1" = "0" ] ; then
|
||||
systemctl stop nginx.service
|
||||
systemctl stop restagent.service
|
||||
systemctl stop crontask.service
|
||||
systemctl stop sshsvc.service
|
||||
systemctl stop nbi_alarm.service
|
||||
systemctl stop nbi_agent.service
|
||||
systemctl stop 4a_agent.service
|
||||
#rm -rf /usr/local/omc
|
||||
rm -rf /etc/nginx/conf.d/omc.conf
|
||||
systemctl disable restagent.service
|
||||
systemctl disable crontask.service
|
||||
systemctl disable sshsvc.service
|
||||
systemctl disable nbi_alarm.service
|
||||
systemctl disable nbi_agent.service
|
||||
systemctl disable 4a_agent.service
|
||||
systemctl daemon-reload
|
||||
else
|
||||
systemctl daemon-reload
|
||||
@@ -91,9 +76,6 @@ systemctl restart nginx.service
|
||||
systemctl restart restagent.service
|
||||
systemctl restart crontask.service
|
||||
systemctl restart sshsvc.service
|
||||
systemctl restart nbi_alarm.service
|
||||
systemctl restart nbi_agent.service
|
||||
systemctl restart 4a_agent.service
|
||||
fi
|
||||
|
||||
# 规定那些文件必须放入安装程序中,如果没有就报错
|
||||
@@ -116,7 +98,4 @@ fi
|
||||
/lib/systemd/system/restagent.service
|
||||
/lib/systemd/system/crontask.service
|
||||
/lib/systemd/system/sshsvc.service
|
||||
/lib/systemd/system/nbi_alarm.service
|
||||
/lib/systemd/system/nbi_agent.service
|
||||
/lib/systemd/system/4a_agent.service
|
||||
|
||||
|
||||
Reference in New Issue
Block a user