Move to debian packaged certbot

This commit is contained in:
Bob Mottram 2016-10-20 19:05:27 +01:00
parent 7f970fe02c
commit 47db991abf
2 changed files with 6 additions and 19 deletions

View File

@ -57,7 +57,6 @@ NODH=
DH_KEYLENGTH=2048
INSTALL_DIR=/root/build
LETSENCRYPT_SERVER='https://acme-v01.api.letsencrypt.org/directory'
LETSENCRYPT_REPO="https://github.com/certbot/certbot"
MY_EMAIL_ADDRESS=
FRIENDS_MIRRORS_SERVER=
FRIENDS_MIRRORS_PASSWORD=
@ -196,27 +195,18 @@ function add_cert_letsencrypt {
fi
fi
if [ ! -d $INSTALL_DIR ]; then
mkdir -p $INSTALL_DIR
fi
cd $INSTALL_DIR
# obtain the repo
if [ ! -d ${INSTALL_DIR}/letsencrypt ]; then
git_clone $LETSENCRYPT_REPO ${INSTALL_DIR}/letsencrypt
if [ ! -d ${INSTALL_DIR}/letsencrypt ]; then
exit 76283
if [ ! -f /usr/bin/certbot ]; then
apt-get -y install certbot -t jessie-backports
if [ ! -f /usr/bin/certbot ]; then
echo $'LetsEncrypt certbot failed to install'
exit 762830
fi
else
cd ${INSTALL_DIR}/letsencrypt
git_pull $LETSENCRYPT_REPO
fi
# stop the web server
systemctl stop nginx
cd ${INSTALL_DIR}/letsencrypt
./letsencrypt-auto certonly --server $LETSENCRYPT_SERVER --standalone -d $LETSENCRYPT_HOSTNAME --renew-by-default --agree-tos --email $MY_EMAIL_ADDRESS
certbot certonly --server $LETSENCRYPT_SERVER --standalone -d $LETSENCRYPT_HOSTNAME --renew-by-default --agree-tos --email $MY_EMAIL_ADDRESS
if [ ! "$?" = "0" ]; then
echo $"Failed to install letsencrypt for domain $LETSENCRYPT_HOSTNAME"
systemctl start nginx

View File

@ -31,9 +31,6 @@
# default search engine for command line browser
DEFAULT_SEARCH='https://searx.laquadrature.net'
# This isn't used here, but is included for mirrors creation purposes
LETSENCRYPT_REPO="https://github.com/letsencrypt/letsencrypt"
# Whether Let's Encrypt is enabled for all sites
LETSENCRYPT_ENABLED="no"
LETSENCRYPT_SERVER='https://acme-v01.api.letsencrypt.org/directory'