From d2ed6b8d3bc04fee64def35f3031387b281cedaf Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 19 Mar 2025 10:06:25 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=9E=84=E5=BB=BA=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/linux/usr/local/etc/omc/script/setup.sh | 15 ++++----------- build/pkg/deb/DEBIAN/postinst | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/build/linux/usr/local/etc/omc/script/setup.sh b/build/linux/usr/local/etc/omc/script/setup.sh index 51942e99..9a2999a9 100644 --- a/build/linux/usr/local/etc/omc/script/setup.sh +++ b/build/linux/usr/local/etc/omc/script/setup.sh @@ -1,5 +1,5 @@ #!/bin/bash - +set -x OMCBinFile=/usr/local/bin/omc OMCEtcDir=/usr/local/etc/omc confFile=$OMCEtcDir/omc.yaml @@ -26,13 +26,6 @@ usage() { exit 1 } -# Different processing depending on the value of 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 -} - # ========================= while [[ $# -gt 0 ]]; do @@ -72,7 +65,7 @@ if [ -z "$T_PARAM" ]; then echo "Error: You must specify -i (install) or -u (upgrade) first." usage fi -#echo "Type parameter: $T_PARAM" +echo "Type parameter: $T_PARAM" # Determine if -m is passed in if [ -n "$M_PARAM" ]; then @@ -85,7 +78,7 @@ if [ -n "$M_PARAM" ]; then sed -i "s/serverVersion: \"standard\"/serverVersion: \"${M_PARAM}\"/" $confFile MODE=$M_PARAM fi -#echo "Mode parameter: $MODE" +echo "Mode parameter: $MODE" # Determine if -c is passed in if [ -n "$C_PARAM" ]; then @@ -97,7 +90,7 @@ if [ -n "$C_PARAM" ]; then sed -i "s/VENDORS=.*/VENDORS=${C_PARAM}/" $VariableFile VENDORS=$C_PARAM fi -#echo "Customize parameter: $VENDORS" +echo "Customize parameter: $VENDORS" # ========================= if [[ "$T_PARAM" == "install" && "$MODE" == "standard" ]]; then diff --git a/build/pkg/deb/DEBIAN/postinst b/build/pkg/deb/DEBIAN/postinst index e65cee55..8631a287 100644 --- a/build/pkg/deb/DEBIAN/postinst +++ b/build/pkg/deb/DEBIAN/postinst @@ -27,7 +27,7 @@ if [ ! -f $RootDir/omc.conf ]; then fi if [ $? -ne 0 ]; then echo "Initialization failure." - rm -rf $RootDir + #rm -rf $RootDir exit 1 fi