mirror of
https://github.com/YunoHost-Apps/kimai2_ynh.git
synced 2024-09-03 19:26:26 +02:00
Update upgrade
Doing a hard cache flush for major upgrade
This commit is contained in:
parent
3a09fd9414
commit
dd64e8fd03
1 changed files with 9 additions and 1 deletions
|
@ -37,7 +37,7 @@ upgrade_type=$(ynh_check_app_version_changed)
|
||||||
if [ "$database" == "sqlite" ]
|
if [ "$database" == "sqlite" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Sqlite is not more supported by Kimai2..."
|
ynh_script_progression --message="Sqlite is not more supported by Kimai2..."
|
||||||
ynh_script_progression --message="Kimai2 will be upgrade to last available version : 1.13"
|
ynh_script_progression --message="Kimai2 will be upgraded to last available version : 1.13"
|
||||||
if ynh_compare_current_package_version --comparison ge --version 1.17.1~ynh1
|
if ynh_compare_current_package_version --comparison ge --version 1.17.1~ynh1
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Kimai2 sqlite version is already to the last available version, no upgrade will be made"
|
ynh_script_progression --message="Kimai2 sqlite version is already to the last available version, no upgrade will be made"
|
||||||
|
@ -116,6 +116,14 @@ then
|
||||||
ynh_setup_source --dest_dir="$final_path" --source_id="$database" --keep="config/packages/local.yaml var/invoices/ var/data/"
|
ynh_setup_source --dest_dir="$final_path" --source_id="$database" --keep="config/packages/local.yaml var/invoices/ var/data/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ynh_compare_current_package_version --comparison le --version 1.30.0~ynh1 ]
|
||||||
|
then
|
||||||
|
ynh_script_progression --message="Doing a hard cache flush for major Kimai update from version 1.x to 2.x"
|
||||||
|
# https://www.kimai.org/documentation/updates.html
|
||||||
|
rm -r "$final_path/var/cache/*"
|
||||||
|
rm -r "$final_path/var/plugins/*"
|
||||||
|
fi
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
Loading…
Add table
Reference in a new issue