Ajout de la variable CMD_PARPAR configurable pour les options parpar
- 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
This commit is contained in:
parent
e518229940
commit
41edbfc11e
@ -27,5 +27,9 @@ MYSQL_USER=""
|
|||||||
MYSQL_PASS=""
|
MYSQL_PASS=""
|
||||||
MYSQL_DB=""
|
MYSQL_DB=""
|
||||||
|
|
||||||
|
#CMD_parpar
|
||||||
|
|
||||||
|
CMD_PARPAR="-s10M -S -m4096M -t16 -r20%"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,9 @@ while true; do
|
|||||||
db_query "UPDATE \`$MYSQL_TABLE\` SET status = 4 WHERE id = ${id};"
|
db_query "UPDATE \`$MYSQL_TABLE\` SET status = 4 WHERE id = ${id};"
|
||||||
fi
|
fi
|
||||||
echo -e "${CYAN}CREATION DES PAR2${NORMAL}" | tee -a "$LOG"
|
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)
|
> >(tee -a "$LOG") 2> >(tee -a "$LOG" >&2)
|
||||||
ret=$?
|
ret=$?
|
||||||
if [ $ret -ne 0 ]; then
|
if [ $ret -ne 0 ]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user