All pastes #255569 Raw Edit

g

public shellscript v1 · immutable
#255569 ·published 2006-11-23 03:12 UTC
rendered paste body
#!/bin/bashABORT="3"if [ -z ${CHECK} ]thendeclare -x CHECK="0"fi  if wget --no-check-certificate -q -o /root/sslcheckdownload https://www.ferventwear.com/then    /bin/rm -f /root/sslcheckdownload    unset CHECK     exit 0      else        if [ ${CHECK} -gt ${ABORT} ]         then           printf "\n\nHTTPD SSL FAILED\n\nAllowable Tries To Start Exceeded!.. Aborting.. \           \n\nPlease Check ASAP!!!!\n\n\nThanks,\n${HOSTNAME}" |mail -s "ALERT: SSL FAILURE \            -- ${HOSTNAME}" support@eleven2.com            exit 0else       printf "\n\n++++SSL FAILED++++\n\n" # we think SSL Failed       killall -9 httpd                    # kill apache       pkill -9 httpd                      # kill it again       service httpd start                 # try to start apache in -DSSL       sleep 10                            # We have to sleep while apache starts or we start an endless loop and that would be bad       CHECK=$((CHECK+1))                  # Increment $CHECK       export CHECK                        # Make sure its an env variable       exec /root/sslcheck.sh              # re-execute this script  fi                                       # end of the if then statementfiexit 0                                     # we wont ever get here but eh we want to stay technicaly correct right?