This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TARGETS="www.google.com www.cnn.com"; | |
RECIPIENT="[email protected]"; | |
DAYS=7; | |
for TARGET in $TARGETS | |
do | |
echo "checking if $TARGET expires in less than $DAYS days"; | |
expirationdate=$(date -d "$(: | openssl s_client -connect $TARGET:443 -servername $TARGET -4 2>/dev/null \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Tomcat Control Script | |
# | |
# Usage: | |
# ln -s /path/to/tomcatctl $HOME/apache-tomcat-6.0.37/ | |
# sudo ln -s $HOME/apache-tom-6.0.37/tomcatctl /etc/init.d/tomcatctl | |
# sudo /etc/init.d/tomcatctl status | |
# | |
# In crontab | |
# */1 * * * * $HOME/apache-tomcat-6.0.37/tomcatctl monitor http://localhost:8080/ > /dev/null || $HOME/apache-tomcat-6.0.37/tomcatctl condrestart > /dev/null |