filter="$(printf 's/.\[%s\][[:space:]]\([^"]*\)/\\1/p' "$(json_path "${1:-}" "${2:-}")")"
Please, no! How can you know this is safe?
Why not just use Python? It is installed pretty much everywhere, supports json without such hacks.
filter="$(printf 's/.\[%s\][[:space:]]\([^"]*\)/\\1/p' "$(json_path "${1:-}" "${2:-}")")"
Please, no! How can you know this is safe?
Why not just use Python? It is installed pretty much everywhere, supports json without such hacks.
#!/bin/sh
set -eu
set -o pipefail
cd /home/letsencrypt
openssl verify -CAfile lets-encrypt-x3-cross-signed.pem -attime `date -d 'next month' '+%s'` mah_domain.crt | grep expired || exit 0
DT=`date "+%Y%m%d"`
python3 acme-tiny/acme_tiny.py --account-key account.key --csr mah_domain.csr --acme-dir /srv/www/mah_domain/htdocs/.well-known/acme-challenge/ > signed_${DT}.crt
curl -sO https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.p...
cat signed_${DT}.crt lets-encrypt-x3-cross-signed.pem > mah_domain_chained_${DT}.pem
mv mah_domain_chained_${DT}.pem mah_domain_chained.pem
mv signed_${DT}.crt mah_domain.crt
set +e
nginx -c /srv/nginx/conf/nginx.conf -s reload
Using this exact shebang line signals "This script is intended to be executed directly (not a python module) and it only needs the python3 standard library."
maybe for dev environments, but certainly not for servers
I'm also not sure distros generally care about LSB. Debian dropped it years ago and did any distro even bother to implement it correctly?
Yes, but which version?
MacOS Sonoma (the latest version) doesn't include Python at all; older versions of MacOS which are still supported ship with Python 2.x
I know of a couple large organizations that have tens of thousands of RHEL 7 machines that use letsencrypt for customer websites, and I sent this project to sysadmins on their teams, so it's very realistic to expect that businesses are still using supported software.
Not everyone can just upgrade to the latest version of Ubuntu every 6 months for their production workloads like you might expect.
> I don't think
> target audience
You != people
Then address this to the owners of those machines. And get a load of cash ready to give it to them, so they could migrate to somehitng newer.
Not the modules, but Python itself.