#!/bin/bash pass_crypt="$HOME/.weechat/certs/passphrase.gpg" cert_crypt="$HOME/.weechat/certs/nick.pem.gpg" gpg -dr tawal --output "${pass_crypt%.*}" "$pass_crypt" # Adapter le nom d'utilisateur. gpg -dr tawal --output "${cert_crypt%.*}" "$cert_crypt" # Pareil ici. # Boucle d'effacement des fichiers en clair dès qu'ils ont étés lus. while read -r file do [ -f "$file" ] && { rm "$file" ((++i)) } ((i>=2)) && break done < <(inotifywait -qme access --format "%w" "${pass_crypt%.*}" "${cert_crypt%.*}") & /usr/bin/weechat