Skip to content

Commit

Permalink
Confirm environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Cp0204 committed May 5, 2024
1 parent bd5aa00 commit ccd2e90
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ www_dir="/var/lib/casaos/www"
index_html="${www_dir}/index.html"
index_html_bak="${index_html}.bak"

# Confirm environment
if [[ -f "$index_html" ]]; then
echo "Running on: CasaOS"
else
echo "Not supported on current systems."
exit 0
fi

start() {
echo "Starting..."

Expand All @@ -18,7 +26,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 ccd2e90

Please sign in to comment.