1
0
This commit is contained in:
2023-08-26 11:25:40 +08:00
parent e9805e98e4
commit 9545d76071
34 changed files with 1546 additions and 0 deletions

7
debbuild/DEBIAN/control Normal file
View File

@@ -0,0 +1,7 @@
Package: OMC
Version: 1
Section: AGrandTech
Prioritt: optional
Architecture: amd64
Maintainer: Simon Zhangsz
Description: OMC

17
debbuild/DEBIAN/postinst Normal file
View File

@@ -0,0 +1,17 @@
# !/bin/sh
echo ""
echo "* To start/stop/restart rest agent service run:"
echo " sudo systemctl start/stop/restart restagent.service"
echo " sudo systemctl start/stop/restart crontask.service"
echo ""
systemctl enable restagent.service
systemctl enable crontask.service
systemctl daemon-reload
if ! id -u omc >/dev/null 2>&1 ; then
useradd -d /opt/omc -m -s /bin/bash -p1000ftp@kp omc;
mkdir -p /opt/omc/ftp
else
echo "user omc exist";
fi

9
debbuild/DEBIAN/postrm Normal file
View File

@@ -0,0 +1,9 @@
# !/bin/bash
systemctl stop nginx.service
systemctl stop restagent.service
systemctl stop crontask.service
#rm -rf /usr/local/omc
rm -rf /etc/nginx/conf.d/omc.conf
systemctl disable restagent.service
systemctl disable crontask.service
systemctl daemon-reload

View File

@@ -0,0 +1,16 @@
logger:
file: /usr/local/omc/log/restagent.log
level: debug
rest:
addr: 0.0.0.0
port: 3030
database:
type: mysql
user: root
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: omc_db