1
0

conversion des nzb existant voir readme pour la commande

This commit is contained in:
unfr 2025-03-12 11:47:10 +01:00
parent 3d1972720e
commit 2ef4241d66
2 changed files with 23 additions and 0 deletions

16
autopost/compress.sh Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
source /home/$USER/autopost/common.sh
# Recherche récursive des fichiers .nzb dans FINIS
find ${DOSSIER_NZB_FINAL} -type f -name "*.nzb" | while IFS= read -r fichier; do
# Supprime l'extension .nzb pour conserver le chemin complet
fichier_sans_extension="${fichier%.nzb}"
# Crée l'archive 7z dans le même répertoire que le fichier original
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on "${fichier_sans_extension}.7z" "$fichier" > /dev/null 2>&1
# Si la compression a réussi, supprime le fichier .nzb original
if [ $? -eq 0 ]; then
rm "$fichier"
fi
done

View File

@ -35,6 +35,13 @@ wget -qO install.sh https://tig.unfr.pw/UNFR/postauto/raw/branch/main/install.sh
postauto stop && wget -qO update.sh https://tig.unfr.pw/UNFR/postauto/raw/branch/main/update.sh && chmod +x update.sh && ./update.sh postauto stop && wget -qO update.sh https://tig.unfr.pw/UNFR/postauto/raw/branch/main/update.sh && chmod +x update.sh && ./update.sh
``` ```
##### Update passage EN 7z (12/03/2024)
```sh
cd autopost
wget -qO compress.sh https://tig.unfr.pw/UNFR/postauto/raw/branch/main/compress.sh && chmod +x compress.sh && ./compress.sh
```
#### Configuration. #### Configuration.
Éditer le fichier /home/$USER/autopost/conf.sh Éditer le fichier /home/$USER/autopost/conf.sh
```sh ```sh