diff --git a/app/run.sh b/app/run.sh index 634c852..65dabfa 100644 --- a/app/run.sh +++ b/app/run.sh @@ -6,7 +6,14 @@ mod_dir="${config_dir}/mod" mod_store_dir="${config_dir}/mod_store" icon_dir="${config_dir}/icon" -www_dir="/var/lib/casaos/www" +# Judgment in CasaOS or ZimaOS +if [[ -f "/var/lib/casaos/www/index.html" ]]; then + www_dir="/var/lib/casaos/www" + echo "Running on: CasaOS" +elif [[ -f "/usr/share/casaos/www/index.html" ]]; then + www_dir="/var/lib/casaos/www" + echo "Running on: ZimaOS" +fi index_html="${www_dir}/index.html" index_html_bak="${index_html}.bak" @@ -18,7 +25,7 @@ start() { echo "Creating directory ${mod_store_dir}" mkdir -p "$mod_store_dir" cp -r /app/mod/* "$mod_store_dir" - echo -e "Delete this folder and it will be recreated when the new version of the container is started.\n删除本文件夹,新版本容器启动时将重建。" >> "${mod_store_dir}/Get_New_MODs.txt" + echo -e "Delete this folder and it will be recreated when the new version of the container is started.\n删除本文件夹,新版本容器启动时将重建。" >>"${mod_store_dir}/Get_New_MODs.txt" fi # Process mapping directory