package update

This commit is contained in:
Aliberk Sandıkçı 2023-12-20 23:05:13 +03:00
parent 99e5499c24
commit c4a5f32596
Signed by: asandikci
GPG key ID: 25C67A03B5666BC1

View file

@ -18,14 +18,16 @@ upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="upgrade type is: $upgrade_type"
if [ "$upgrade_type" == "UPGRADE_APP" ] # FIXME possibly not the best way, but UPGRADE_APP varible returns UNKNOWN.
then
# if [ "$upgrade_type" == "UPGRADE_APP" ]
# then
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="config.php storage/" ynh_setup_source --dest_dir="$install_dir" --keep="config.php storage/"
fi # fi
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"