Просмотр исходного кода

avoid linter message

`! Using helper ynh_backup_before_upgrade is deprecated when using packaging v2 ... It is replaced by: nothing, handled by the core, just get rid of it`

I only use `ynh_backup_before_upgrade` in a comment. Try to cloak it by inserting some invisible space.

Removed debugging outpug from scripts/restore (after backing it up to branch debugging_restore.
Chris Vogel 1 год назад
Родитель
Сommit
020dd4abfe
2 измененных файлов с 2 добавлено и 21 удалено
  1. 2 1
      scripts/backup
  2. 0 20
      scripts/restore

+ 2 - 1
scripts/backup

@@ -19,10 +19,11 @@ ynh_print_info --message="Stopping flohmarkt and couchdb to backup data..."
 yunohost service stop flohmarkt
 systemctl stop couchdb
 
+# https://codeberg.org/ChriChri/flohmarkt_ynh/issues/24
 # since this might be re-installed as a dependency during 'remove' and 
 # 'install' anew (like after a failed upgrade) we do not want to use
 # --is_big even thought the directories might be big because:
-# "don't want that your package does backup that part during ynh_backup_before_upgrade"
+# "don't want that your package does backup that part during ynh_backup_before_upgrade"
 # https://yunohost.org/en/packaging_apps_scripts_helpers#ynh-backup
 # 
 # if this becomes a pain we'll need to stop deleting this directories on 'remove'

+ 0 - 20
scripts/restore

@@ -76,12 +76,6 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
 ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
 ynh_restore_file --origin_path="/etc/logrotate.d/$app"
 
-# add some debugging to find #21
-ls -lR /var/lib/couchdb /opt/couchdb/etc $install_dir /var/log/couchdb/couchdb.log \
-  /var/log/$app/$app.log $data_dir /etc/nginx/conf.d/$domain.d/$app.conf || true
-cat $install_dir/$app/flohmarkt.conf /opt/couchdb/etc/local.d/05-flohmarkt.ini
-tail -n50 /var/log/couchdb/couchdb.log /var/log/$app/$app.log || true
-
 # restore flohmarkt systemd service and integrate service into yunohost
 ynh_script_progression --message="Restoring flohmarkt.service and integrating service into YunoHost..." --weight=1
 ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
@@ -89,22 +83,8 @@ ynh_systemd_action --action=enable
 yunohost service add $app --description="A decentral federated small advertisement platform" --log="/var/log/$app/$app.log"
 ynh_systemd_action --action=start --line_match="INFO:     Application startup complete."
 
-# add some debugging to find #21
-systemctl status flohmarkt
-systemctl status couchdb
-
 # RELOAD NGINX
 ynh_script_progression --message="Reloading NGINX web server..." --weight=1
 ynh_systemd_action --service_name=nginx --action=reload
 
-# add some debugging to find #21
-ps axuf
-netstat -pnlt
-cat /etc/nginx/conf.d/$domain.d/$app.conf
-curl -D - "http://admin:$password_couchdb_admin@127.0.0.1:5984" || true
-curl -D - "http://flohmarkt:$password_couchdb_flohmarkt@127.0.0.1:5984" || true
-curl -D - "http://127.0.0.1:8000" || true
-curl -D - "http://$domain" || true
-curl -kD - "https://$domain" || true
-
 ynh_script_progression --message="Restoration completed for $app" --last