Introduce acme.sh Let's Encrypt client
This commit is contained in:
parent
dd5301a10d
commit
a2323d1496
4
basic.sh
4
basic.sh
@ -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
|
||||
|
||||
|
6
basic/usr/local/bin/update-acme.sh
Executable file
6
basic/usr/local/bin/update-acme.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user