perf: 调整打包目录

This commit is contained in:
TsMask
2025-03-17 14:11:34 +08:00
parent b3bb2d788f
commit c20a3e5f04
187 changed files with 121 additions and 13 deletions

View File

@@ -10,13 +10,26 @@ echo " sudo systemctl start|stop|status|restart omc.service"
echo ""
# 检查是否是第一次安装或是升级
if [ ! -f $RootDir/omc.yaml ]; then
if [ ! -f $RootDir/omc.conf ]; then
# 第一次安装,执行相关操作
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"
bash $RootDir/script/setup.sh -i -c $C_PARAM
else
bash $RootDir/script/setup.sh -i
fi
# exit while failed to run err
if [ $? -ne 0 ]; then
echo "Initialization failure."
exit 1
fi
systemctl daemon-reload
systemctl enable omc.service
systemctl enable sshsvc.service
@@ -25,6 +38,13 @@ if [ ! -f $RootDir/omc.yaml ]; then
systemctl restart sshsvc.service
else
# 升级时的操作
bash $RootDir/script/setup.sh -u
if [ $? -ne 0 ]; then
echo "Execution failed. Exiting."
exit 1
fi
systemctl daemon-reload
systemctl start omc.service
systemctl start sshsvc.service