From 724c0e2ae5fa0b71c43dd1a1c384c9654c8d82be Mon Sep 17 00:00:00 2001 From: Siphonight Date: Sat, 11 Jul 2026 13:08:27 +0200 Subject: [PATCH] Modification check syncro + passage a gitea raw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modification du check utilisant ps pour le renbdre plus standard et compatible avec les shells alternatifs (-ax est plus typé Linux) et remplacement par -e, plus répendu. Changement du check curl pour utiliser la version raw de la page au lieu de la version HTML : parsing plus fiable, plus rapide à récupérer et moins de caractères spéciaux à gérer. --- bw_cli_autolog.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bw_cli_autolog.sh b/bw_cli_autolog.sh index 4dae452..8305330 100644 --- a/bw_cli_autolog.sh +++ b/bw_cli_autolog.sh @@ -6,7 +6,7 @@ Bitwarden_Server="" # Variables internes au script Inception_Detect=0 # Détection de terminaux parents/enfants -Local_Version="2.2.7" +Local_Version="2.2.8" # Fonction de suppression et nettoyage des identités identities_destroy() { @@ -30,7 +30,7 @@ identities_destroy() { # Processus de création des identités if [ -z "${BW_Session}" ] || [ "${#BW_Session}" -lt 10 ]; then trap identities_destroy EXIT - Latest_Version=$(curl -s "https://gitea.cloudyfy.fr/Siphonight/bw-cli_autologger/src/branch/main/bw_cli_autolog.sh" | grep -m1 "Local_Version" | cut -d ';' -f 2 | cut -d '&' -f 1) + Latest_Version=$(curl -s "https://gitea.cloudyfy.fr/Siphonight/bw-cli_autologger/raw/branch/main/bw_cli_autolog.sh" | grep -m1 "Local_Version" | cut -d '"' -f 2) if [ "${Local_Version}" != "${Latest_Version}" ]; then tput setaf 1 echo "Votre version de l'utilitaire n'est pas à jour." @@ -60,7 +60,7 @@ if [ "${BW_List}" != "" ]; then fi # shellcheck disable=SC2009 - if [ "$(ps -ax | grep 'sh -c while true; do sleep 10; bw sync -f; done' | grep -cv 'grep')" = "0" ]; then + if [ "$(ps -e | grep 'sh -c while true; do sleep 10; bw sync -f; done' | grep -cv 'grep')" = "0" ]; then nohup sh -c 'while true; do sleep 10; bw sync -f; done' >/dev/null 2>&1 & fi