1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mybb_ynh.git synced 2024-09-03 19:46:07 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2021-08-28 17:15:07 +02:00
parent f70b218c74
commit 42050c5084
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -43,6 +43,18 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script # Exit if an error occurs during the execution of the script
ynh_abort_if_errors ynh_abort_if_errors
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
@ -62,13 +74,17 @@ then
#tmpdir="$(mktemp -d)" #tmpdir="$(mktemp -d)"
#cp -a "$final_path/inc/config.php" "$tmpdir/config.php" #cp -a "$final_path/inc/config.php" "$tmpdir/config.php"
ynh_secure_remove --file="$final_path" ynh_secure_remove --file="$final_path"
# 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="$final_path" ynh_setup_source --dest_dir="$final_path"
mv $final_path/Upload/* $final_path/ mv $final_path/Upload/* $final_path/
ynh_secure_remove --file="$final_path/Documentation" ynh_secure_remove --file="$final_path/Documentation"
ynh_secure_remove --file="$final_path/Upload" ynh_secure_remove --file="$final_path/Upload"
# If install exist, remove it
if [ -d "$final_path/install" ]; then
ynh_secure_remove --file="$final_path/install"
fi
#cp -a "$tmpdir/config.php" "$final_path/inc/config.php" #cp -a "$tmpdir/config.php" "$final_path/inc/config.php"
fi fi
@ -79,7 +95,7 @@ chown -R $app:www-data "$final_path"
#================================================= #=================================================
# ADD A CONFIGURATION # ADD A CONFIGURATION
#================================================= #=================================================
# ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/config.php" --destination="$final_path/inc/config.php" ynh_add_config --template="../conf/config.php" --destination="$final_path/inc/config.php"