perf: 构建工具调整

This commit is contained in:
TsMask
2025-03-18 10:08:59 +08:00
parent a27e1d243c
commit d6e42ce4f5
215 changed files with 184 additions and 6015 deletions

View File

@@ -2,28 +2,30 @@
# 安装后执行脚本
RootDir=/usr/local/etc/omc
# 执行安装后配置
# Perform post-installation configuration
echo ""
echo "Output: $RootDir"
echo "Please Run:"
echo " sudo systemctl start|stop|status|restart omc.service"
echo ""
# 检查是否是第一次安装或是升级
# Check if this is the first installation or upgrade
if [ ! -f $RootDir/omc.conf ]; then
# 第一次安装,执行相关操作
# First installation, perform the related operations
chmod +rx /usr/local/bin/omc
cp $RootDir/default/omc.conf $RootDir/omc.conf
cp $RootDir/default/omc.yaml $RootDir/omc.yaml
cp $RootDir/default/sshsvc.yaml $RootDir/sshsvc.yaml
# read environment parameter and to do
if [ -n "$C_PARAM" ]; then
echo "C parameter: $C_PARAM"
if [ -n "$M_PARAM" ] && [ -n "$C_PARAM" ]; then
bash $RootDir/script/setup.sh -i -m $M_PARAM -c $C_PARAM
elif [ -n "$C_PARAM" ]; then
bash $RootDir/script/setup.sh -i -c $C_PARAM
else
else
bash $RootDir/script/setup.sh -i
fi
rm -rf $RootDir/vendor
# exit while failed to run err
if [ $? -ne 0 ]; then
echo "Initialization failure."
@@ -37,7 +39,7 @@ if [ ! -f $RootDir/omc.conf ]; then
systemctl restart omc.service
systemctl restart sshsvc.service
else
# 升级时的操作
# Operation when upgrading
bash $RootDir/script/setup.sh -u
if [ $? -ne 0 ]; then