mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
Update upgrade
This commit is contained in:
parent
cb48ab7b0d
commit
2d403405da
1 changed files with 11 additions and 10 deletions
|
@ -29,14 +29,6 @@ if [ -z "${secret_key:-}" ]; then
|
|||
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
|
||||
fi
|
||||
|
||||
if [ -d "$install_dir/data" ]; then
|
||||
ynh_print_warn "Migrating data directory to $data_dir..."
|
||||
|
||||
# remove old configuration files
|
||||
ynh_secure_remove --file="$install_dir/data/config.local.user.php"
|
||||
mv "$install_dir/data" "$data_dir"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
@ -44,12 +36,21 @@ fi
|
|||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=5
|
||||
|
||||
if [ -d "$install_dir/data" ]; then
|
||||
ynh_print_warn "Migrating data directory to $data_dir..."
|
||||
|
||||
# remove old configuration files
|
||||
ynh_secure_remove --file="$install_dir/data/config.local.user.php"
|
||||
mv "$install_dir/data" "$data_dir"
|
||||
fi
|
||||
|
||||
ynh_secure_remove --file="$install_dir/config.local.yunohost.php"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir" #--keep="config.local.php"
|
||||
fi
|
||||
|
||||
ynh_secure_remove --file="$install_dir/config.local.yunohost.php"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue