From f35c535a772b41942ce20db8bd5f9785db4ae95e Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 20 Mar 2025 10:13:04 +0800 Subject: [PATCH] =?UTF-8?q?ref:=20=E6=89=93=E5=8C=85=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linux/usr/local/etc/omc/script/setup.sh | 2 +- pkg.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/linux/usr/local/etc/omc/script/setup.sh b/linux/usr/local/etc/omc/script/setup.sh index 5d210bf..803abc7 100644 --- a/linux/usr/local/etc/omc/script/setup.sh +++ b/linux/usr/local/etc/omc/script/setup.sh @@ -95,7 +95,7 @@ fi # ========================= if [[ "$T_PARAM" == "install" && "$MODE" == "standard" ]]; then - if ! command -v mysql &> /dev/null && ! command -v mariadb &> /dev/null; then + if ! command -v mysql &> /dev/null || ! command -v mariadb &> /dev/null; then echo "MySQL or MariaDB not installed" exit 1 fi diff --git a/pkg.sh b/pkg.sh index 306b894..8af5afc 100644 --- a/pkg.sh +++ b/pkg.sh @@ -75,6 +75,14 @@ if [ -n "$BuildApi" ]; then make cp -rf sshsvc $output/sshsvc echo "===> go build sshsvc copy to $output" + + # Vendor Database + dirs="database default vendor" + for v in ${dirs}; do + path=$BuildDir/tmp/usr/local/etc/omc + rm -rf ${path}/${v} + cp -rf ${ApiDir}/build/${v} ${path}/${v} + done fi # =================== deb/rpm