Eu tenho um arquivo de script de teste de certificado,
Checking_file.sh
file ="/var/cert.pem"
openssl x509 -checkend $(( 86400 * $DAYS )) -in $file > /dev/null
seu arquivo de trabalho, mas não quero compartilhar meu certificado com o cliente, preciso adicionar certificado a Checking_file.sh
, incorporar Checking_file.sh
e enviar para o cliente.
o que eu fiz:
Eu sigo isto documentar converter cert.pem para cert.tar e extrair via script seu erro abaixo:
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Depois de adicionar cert.tar.gz ao arquivo example.sh: (Secound File)
Eu tentei apenas converter cert.pem para cert.tar.gz e adicionei ao arquivo example.sh. Depois de executar este script, cert.tar.gz não é extraído. seu lançamento acima do erro.
#!/bin/bash
echo "Extracting file into 'pwd'"
# searches for the line number where finish the script and start the tar.gz
SKIP='awk '/^__TARFILE_FOLLOWS__/ { print NR + 1; exit 0; }' $0'
#remember our file name
THIS='pwd'/$0
# take the tarfile and pipe it into tar
tail -n +$SKIP $THIS | tar -xz
# Any script here will happen after the tar file extract.
echo "Finished"
exit 0
# NOTE: Don't place any newline characters after the last line below.
__TARFILE_FOLLOWS__
Bfile ="/var/cert.pem"
openssl x509 -checkend $(( 86400 * $DAYS )) -in $file > /dev/null
\CA\E58Ygzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
\ED\D5IF\B36\F09\F3)\E6E\DA #!/bin/bash
echo "Extracting file into 'pwd'"
# searches for the line number where finish the script and start the tar.gz
SKIP='awk '/^__TARFILE_FOLLOWS__/ { print NR + 1; exit 0; }' $0'
#remember our file name
THIS='pwd'/$0
# take the tarfile and pipe it into tar
tail -n +$SKIP $THIS | tar -xz
# Any script here will happen after the tar file extract.
echo "Finished"
exit 0
# NOTE: Don't place any newline characters after the last line below.
__TARFILE_FOLLOWS__
B%pre%\CA\E58Y%pre%\ED\D5IF\B36\F09\F3)\E6E\DA%pre% $z\B01˰&p\A9[\B0xȧ/\F3\BE=tZ\A9RUU\F2\EFb\C9\FC\B7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