From 41edbfc11e35344a8accc675f40df1b8dfe9dfff Mon Sep 17 00:00:00 2001 From: unfr Date: Sun, 12 Oct 2025 18:33:33 +0200 Subject: [PATCH] Ajout de la variable CMD_PARPAR configurable pour les options parpar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Lecture de CMD_PARPAR depuis conf.sh - Fallback sur valeurs par défaut si variable vide ou inexistante - Valeurs par défaut: -s10M -S -m4096M -t16 -r20% - Permet de personnaliser les options parpar sans modifier le script --- autopost/conf.sh | 4 ++++ autopost/posteur.sh | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/autopost/conf.sh b/autopost/conf.sh index 23a4ec8..05f2e69 100644 --- a/autopost/conf.sh +++ b/autopost/conf.sh @@ -27,5 +27,9 @@ MYSQL_USER="" MYSQL_PASS="" MYSQL_DB="" +#CMD_parpar + +CMD_PARPAR="-s10M -S -m4096M -t16 -r20%" + diff --git a/autopost/posteur.sh b/autopost/posteur.sh index 5c484cf..85571b0 100644 --- a/autopost/posteur.sh +++ b/autopost/posteur.sh @@ -49,7 +49,9 @@ while true; do db_query "UPDATE \`$MYSQL_TABLE\` SET status = 4 WHERE id = ${id};" fi echo -e "${CYAN}CREATION DES PAR2${NORMAL}" | tee -a "$LOG" - parpar -s10M -S -m4096M -t16 -r20% -O -o "${FILESANSEXT}.par2" "${name}" \ + # Utilise CMD_PARPAR si défini, sinon valeurs par défaut + PARPAR_OPTS="${CMD_PARPAR:--s10M -S -m4096M -t16 -r20%}" + parpar $PARPAR_OPTS -O -o "${FILESANSEXT}.par2" "${name}" \ > >(tee -a "$LOG") 2> >(tee -a "$LOG" >&2) ret=$? if [ $ret -ne 0 ]; then