fred | testing podman control

This commit is contained in:
Don Harper 2024-01-28 19:57:37 -06:00
parent 4374ca570e
commit 320a2c1545
3 changed files with 167 additions and 6 deletions

View file

@ -447,7 +447,7 @@ print_docker() {
printf "\\n"
printf " \\033[1;37mDocker:\\033[0m\\n"
docker_info=$(sudo curl -sf --unix-socket /var/run/docker.sock http:/v1.40/info)
docker_info=$(doas curl -sf --unix-socket /var/run/docker.sock http:/v1.40/info)
docker_version=$(echo "$docker_info" | jq -r '.ServerVersion')
@ -457,7 +457,7 @@ print_docker() {
printf " %s Version %s%s%s %s Images\\n\\n" "$DOCKER_VERSION_ICON" "$docker_version" "$docker_space" "$DOCKER_IMAGES_ICON" "$docker_images"
docker_list=$(sudo curl -sf --unix-socket /var/run/docker.sock "http://v1.40/containers/json?all=true" | jq -c ' .[]')
docker_list=$(doas curl -sf --unix-socket /var/run/docker.sock "http://v1.40/containers/json?all=true" | jq -c ' .[]')
echo "$docker_list" | while read -r line; do
container_name="$(echo "$line" | jq -r '.Names[]' | sed 's/\///')"
@ -533,10 +533,10 @@ print_letsencrypt() {
printf "\\n"
printf " \\033[1;37mSSL / lets encrypt:\\033[0m\\n"
cert_list=$(sudo find $LETSENCRYPT_CERTPATH -name cert.pem)
cert_list=$(doas find $LETSENCRYPT_CERTPATH -name cert.pem)
for cert_file in $cert_list; do
sudo openssl x509 -checkend $((25 * 86400)) -noout -in "$cert_file" >> /dev/null
doas openssl x509 -checkend $((25 * 86400)) -noout -in "$cert_file" >> /dev/null
result=$?
cert_name=$(echo "$cert_file" | rev | cut -d '/' -f 2 | rev)
@ -544,7 +544,7 @@ print_letsencrypt() {
if [ "$result" -eq 0 ]; then
printf " \\033[%sm%s\\033[0m %s\\n" "$LETSENCRYPT_VALID_COLOR" "$LETSENCRYPT_VALID_ICON" "$cert_name"
else
sudo openssl x509 -checkend $((0 * 86400)) -noout -in "$cert_file" >> /dev/null
doas openssl x509 -checkend $((0 * 86400)) -noout -in "$cert_file" >> /dev/null
result=$?
if [ "$result" -eq 0 ]; then