diff --git a/scripts/upgrade b/scripts/upgrade index 19f04a3..461e834 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -64,13 +58,10 @@ fi # Get the current version of roundcube oldversion=$(grep RCMAIL_VERSION "$install_dir/program/include/iniset.php" | cut -d\' -f4) -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=3 +ynh_script_progression --message="Upgrading source files..." --weight=3 - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -91,19 +82,12 @@ ynh_add_nginx_config #================================================= # CONFIGURE ROUNDCUBE #================================================= +install_roundcube_with_plugins -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - - install_roundcube_with_plugins - - # Migrate roundcube database - pushd "$install_dir" - COMPOSER_ALLOW_SUPERUSER=1 ynh_exec_warn "php$phpversion" ./bin/update.sh --version=$oldversion -y - popd -fi - - +# Migrate roundcube database +pushd "$install_dir" +COMPOSER_ALLOW_SUPERUSER=1 ynh_exec_warn "php$phpversion" ./bin/update.sh --version=$oldversion -y +popd #================================================= # END OF SCRIPT