Advertisement
sergio_educacionit

validator.sh

Dec 5th, 2023
622
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.36 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. bdir=/var/backups
  4.  
  5.  
  6. for archivo in "$bdir/"*; do
  7.    
  8.     if [[ "$archivo" == *".sha256" ]]; then
  9.         continue
  10.     fi
  11.     if [[ "$archivo" == *".sign" ]]; then
  12.         continue
  13.     fi
  14.  
  15.  
  16.  
  17.     echo $archivo
  18.     sha256sum $archivo
  19.     echo Fichero ${archivo}.sha256
  20.     cat ${archivo}.sha256
  21.    
  22.     gpg --verify ${archivo}.sign $archivo 2>&1 | grep -i corr
  23.     echo ""
  24.  
  25. done
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement