perf: 构建工具调整

This commit is contained in:
TsMask
2025-03-18 16:01:11 +08:00
parent f4977d071b
commit 8c1a73e9b3
6 changed files with 52 additions and 64 deletions

View File

@@ -1,4 +1,5 @@
mode: standard
# server version: standard/lite/tenant
serverVersion: "standard"
# file: log file name
# level: /trace/debug/info/warn/error/fatal, default: debug
@@ -35,32 +36,6 @@ webServer:
certFile: /usr/local/etc/omc/certs/omc-web.crt
keyFile: /usr/local/etc/omc/certs/omc-web.key
# data sources
database:
dataSource:
# Default datab887854ase instance
default:
type: "mysql"
host: "127.0.0.1"
port: 33066
username: "root"
password: "1000omc@kp!"
database: "omc_db"
# used to specify the default data source for multiple data resourece
defaultDataSourceName: "default"
# Redis data cache
redis:
dataSource:
# OMC system db
default:
port: 6379 # Redis port
host: "127.0.0.1" # Redis host
password: "helloearth"
db: 10 # Redis db_num
# used to specify the default data source for multiple data resourece
defaultDataSourceName: "default"
# sleep: time delay for after write buffer (millisecond)
# deadLine: timeout for io read and write (second)
mml:

View File

@@ -26,16 +26,6 @@ usage() {
exit 1
}
# standard env
standardEnv() {
if command -v mysql &> /dev/null || command -v mariadb &> /dev/null; then
echo "MySQL or MariaDB installed"
else
echo "MySQL or MariaDB not installed"
exit 1
fi
}
# Different processing depending on the value of customize
customize() {
cp -rf $OMCEtcDir/vendor/$VENDORS/web/* $OMCEtcDir/web/background
@@ -45,7 +35,6 @@ customize() {
# =========================
# 参数解析
while [[ $# -gt 0 ]]; do
case "$1" in
-i|--install)
@@ -113,13 +102,26 @@ fi
#echo "Customize parameter: $VENDORS"
# =========================
if [ "$MODE" = "standard" ]; then
standardEnv
if [[ "$T_PARAM" == "install" && "$MODE" == "standard" ]]; then
if command -v mysql &> /dev/null || command -v mariadb &> /dev/null; then
echo "MySQL or MariaDB installed"
else
echo "MySQL or MariaDB not installed"
exit 1
fi
rm -rf $OMCEtcDir/default/omc_db.sqlite
fi
if [[ "$T_PARAM" == "install" && "$MODE" == "lite" ]]; then
cp -rf $OMCEtcDir/default/omc_db.sqlite $OMCEtcDir/database/omc_db.sqlite
fi
# =========================
$OMCBinFile -c $confFile --sqlPath $OMCEtcDir/database/$MODE/$T_PARAM --sqlSource $MODE
customize
# ========================= Customize
cp -rf $OMCEtcDir/vendor/$VENDORS/web/* $OMCEtcDir/web/background
cp -rf $OMCEtcDir/vendor/$VENDORS/static/* /usr/local/$VENDORS/static
$OMCBinFile -c $confFile --sqlPath $OMCEtcDir/vendor/$VENDORS/database/$MODE/customized.sql --sqlSource $MODE
# bash setup.sh -i -m standard -c omc