diff --git a/scripts/backup b/scripts/backup index 572b62f..1c91c7d 100644 --- a/scripts/backup +++ b/scripts/backup @@ -26,34 +26,18 @@ trap '(cd $install_dir && ynh_exec_as $app php$phpversion bin/console.php mainte ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -#================================================= -# BACKUP FAIL2BAN CONFIGURATION -#================================================= - ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" -#================================================= -# BACKUP LOGROTATE -#================================================= - ynh_backup --src_path="/etc/logrotate.d/$app" -#================================================= -# BACKUP VARIOUS FILES -#================================================= - ynh_backup --src_path="/var/log/$app" ynh_backup --src_path="/etc/systemd/system/$app-daemon.service" diff --git a/scripts/upgrade b/scripts/upgrade index c466471..cda53dd 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) - #================================================= # STOP SYSTEMD SERVICE #================================================= @@ -25,18 +19,11 @@ ynh_systemd_action --service_name="$app-daemon" --action="stop" --log_path="/var #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="config/local.config.php" - ynh_setup_source --dest_dir="$install_dir/addon" --source_id="addons" -fi - -chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --keep="config/local.config.php" +ynh_setup_source --dest_dir="$install_dir/addon" --source_id="addons" # clear the smarty cache # cf: https://github.com/friendica/friendica/issues/11212#issuecomment-1046051750 @@ -44,6 +31,9 @@ ynh_secure_remove --file="$install_dir/view/smarty3/compiled" mkdir "$install_dir/view/smarty3/compiled" chmod -R 775 "$install_dir/view/smarty3" +chmod -R o-rwx "$install_dir" +chown -R "$app:www-data" "$install_dir" + #================================================= # REAPPLY SYSTEM CONFIGURATIONS #=================================================