1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dont-code_ynh.git synced 2024-09-03 18:26:34 +02:00

Fixed upgrade bug

This commit is contained in:
Gérard Collin 2024-02-14 18:19:11 +01:00
parent c47337ef83
commit 3c661796c8
2 changed files with 8 additions and 0 deletions

View file

@ -41,6 +41,12 @@ if [[ -n "${document_path:-}" ]]; then
ynh_app_setting_set --app="$app" --key=document_dir --value="$document_dir" ynh_app_setting_set --app="$app" --key=document_dir --value="$document_dir"
fi fi
# document dir has moved from html_path to data_dir, so set the variable accordingly
if [[ ${document_dir} == ${html_path}* ]]; then
document_dir=$data_dir/docs
ynh_app_setting_set --app="$app" --key=document_dir --value="$document_dir"
fi
if [[ -n "${html_path:-}" ]]; then if [[ -n "${html_path:-}" ]]; then
# Migrate html_path to data_dir # Migrate html_path to data_dir
mv "$html_path/index.html" "$html_path/docs" "$data_dir" mv "$html_path/index.html" "$html_path/docs" "$data_dir"

View file

@ -10,3 +10,5 @@ test_format = 1.0
# ------------------------------- # -------------------------------
test_upgrade_from.7852cc4bf44ff20ee51fe35f3f53dc105e0f6d79.name= "2023-01-07 - Added Ssh support for dev." test_upgrade_from.7852cc4bf44ff20ee51fe35f3f53dc105e0f6d79.name= "2023-01-07 - Added Ssh support for dev."
test_upgrade_from.e89eebdac9f59202202d07972e274ebe6fc7c51c.name= "Before Manifest v2."