Introduce acme.sh Let's Encrypt client

This commit is contained in:
Disassembler 2018-03-25 22:50:18 +02:00
parent dd5301a10d
commit a2323d1496
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
2 changed files with 10 additions and 0 deletions

View File

@ -30,6 +30,10 @@ mkdir /etc/ssl/private
openssl req -x509 -new -out /etc/ssl/certs/services.pem -keyout /etc/ssl/private/services.key -nodes -days 3654 -subj "/CN=$(hostname)"
chmod 640 /etc/ssl/private/services.key
# Configure acme.sh
cp ${SOURCE_DIR}/usr/local/bin/update-acme.sh /usr/local/bin/update-acme.sh
/usr/local/bin/update-acme.sh
# Configure nginx
cp ${SOURCE_DIR}/etc/nginx/nginx.conf /etc/nginx/nginx.conf

View File

@ -0,0 +1,6 @@
#!/bin/sh
mkdir -p /etc/acme.sh.d
wget https://raw.githubusercontent.com/Neilpang/acme.sh/master/acme.sh -O /usr/local/bin/acme.sh
sed -i 's/\$HOME\/.\$PROJECT_NAME/\/etc\/acme.sh.d/' /usr/local/bin/acme.sh
chmod +x /usr/local/bin/acme.sh