Skip to content

Commit

Permalink
Adaptation ZimaOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Cp0204 committed May 5, 2024
1 parent bd5aa00 commit 1998ef0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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="/usr/share/casaos/www"
echo "Running on: ZimaOS"
fi
index_html="${www_dir}/index.html"
index_html_bak="${index_html}.bak"

Expand All @@ -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
Expand Down

0 comments on commit 1998ef0

Please sign in to comment.