check if service is running (master)

This commit is contained in:
Daniel Hansson 2017-06-29 18:15:06 +02:00 committed by GitHub
parent d503c8ec31
commit 2f9df3d640

View File

@ -53,6 +53,12 @@ if ! certbot renew --pre-hook "service apache2 stop" --post-hook "service apache
else
echo "Let's Encrypt SUCCESS!"--$DATE >> /var/log/letsencrypt/cronjob.log
fi
# Check if service is running
if ! pgrep apache2 > /dev/null
then
service apache2 start
fi
CRONTAB
}
add_crontab_le