# HG changeset patch # User Steve Huston # Date 1709328412 18000 # Node ID 96f00cdb66142de5bdda756f056bbaefb727e961 # Parent c36986d268eb0c7cd878677f69fc8d1b8887f0cc Cert check function diff -r c36986d268eb -r 96f00cdb6614 .bash_aliases --- a/.bash_aliases Thu Jan 25 13:26:06 2024 -0500 +++ b/.bash_aliases Fri Mar 01 16:26:52 2024 -0500 @@ -137,7 +137,7 @@ --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE localhost" \ --user-data-dir="${PROXY_PATH}" > /dev/null 2>&1 $PROXY_UMOUNT - # Maybe leave this off, so what if the port is left open if there's no + # Maybe leave this off, so what if the port is left open if there are no # conflicts... # ssh -O cancel -D $PROXY_PORT $PROXY_HOST ) & @@ -194,6 +194,18 @@ # Other Functions +certcheck() { + if [ -z "$1" ] ; then + echo "Usage: certcheck [:port]" + echo " Defaults to port 443 if not specified." + return + fi + H=$1 + [[ $1 =~ :[0-9]+$ ]] || \ + H=$1":443" + echo -n Q | openssl s_client -connect $H | openssl x509 -noout -dates +} + mc-backup() { pushd ~/Dropbox/Saves/minecraft/saves; if [ -d $1 ]; then