Спасибо "coredump". Вы дали мне подсказку, я должен был решить проблему. Я буду использовать комбинацию ЗАВИХРЕНИЯ и также ответа на этой странице.
Вот то, что я придумал, который, кажется, работает на меня. Если можно улучшить этот ответ, я мог бы присудить очки Вам.
#!/bin/bash
rm -f listening.htm
curl -s --connect-timeout 10 --insecure $1 > listening.htm
RETVAL=$?
echo "Curl return value : $RETVAL"
if [ $RETVAL -eq 2 ]; then
echo "Missing URL parameter. Add URL and try again."
fi
if [ $RETVAL -eq 6 ]; then
echo "Unable to resolve host. Check URL and try again."
fi
if [ $RETVAL -eq 0 ]; then
echo "Is the site listening...?"
elif [ $RETVAL -eq 7 ]; then
echo "Server timeout."
elif [ $RETVAL -eq 22 ];then
echo "HTTP error above 400"
else
rm listening.htm
exit 1
fi
if grep -Fq "The site is listening..." listening.htm
then
echo "Health is ok."
else
echo "Service didn't respond. Stopping."
/home/ec2-user/SITE/stopService.sh
sleep 6
echo "Starting service."
/home/ec2-user/SITE/startService.sh
sleep 10
echo "Restarted at `date`" >> monitor.log
rm listening.htm
fi
exit 1
If I remember right Wheezy has a backported 1.0.1e version of OpenSSL. It's still secure against heartbleed.
Running openssl version -a
should give an output similar to:
~# openssl version -a
OpenSSL 1.0.1e 11 Feb 2013
built on: Mon Apr 7 20:32:27 UTC 2014
platform: debian-amd64
If it's built in the last couple days you're fine.
I don't know where you got openssl 1.0.1e-3
. But since it has a release number higher than the versions actually available in the repositories, they are not considered upgrade candidates.
Install the update by selecting its version explicitly:
apt-get install openssl=1.0.1e-2+deb7u6