diff --git a/scripts/upgrade b/scripts/upgrade index 051c77b..26c71c2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,14 +25,9 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=2 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=2 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="app/inc/config.php" -fi +ynh_setup_source --dest_dir="$install_dir" --keep="app/inc/config.php" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -53,15 +48,12 @@ ynh_add_nginx_config #================================================= # UPDATE A CONFIG FILE #================================================= +ynh_script_progression --message="Updating a configuration file..." --weight=2 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Updating a configuration file..." --weight=2 +ynh_add_config --template="config.php" --destination="$install_dir/app/inc/config.php" - ynh_add_config --template="config.php" --destination="$install_dir/app/inc/config.php" - chmod 400 "$install_dir/app/inc/config.php" - chown $app:$app "$install_dir/app/inc/config.php" -fi +chmod 400 "$install_dir/app/inc/config.php" +chown $app:$app "$install_dir/app/inc/config.php" #================================================= # REPLACE LOGO IMAGE (DEFAULT IS FRAMADATE)