-#!/bin/sh
+#!/bin/bash
# statusbar loop
while true; do
bat=$(bat)
[ -f /tmp/update-count ] && updates=$(cat /tmp/update-count)
mails=$(mailcount)
- if [[ $updates -ne 0 ]]; then
+ if [[ ! -z $updates ]]; then
pkgs="pkgs: $updates | "
fi
--- /dev/null
+#!/bin/sh
+
+SERVER=${1:-my.server.com}
+PORT=${2:-993}
+CERT_FOLDER=${3:-~/certs}
+
+openssl s_client -connect ${SERVER}:${PORT} -showcerts 2>&1 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'| sed -ne '1,/-END CERTIFICATE-/p' > ${CERT_FOLDER}/${SERVER}.pem
\ No newline at end of file