2018-12-31 12:53:21 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Install git (required to fetch acme.sh)
|
2020-11-17 17:51:56 +01:00
|
|
|
apk --no-cache --virtual .acmesh-deps add git
|
2018-12-31 12:53:21 +01:00
|
|
|
|
2020-11-17 23:06:14 +01:00
|
|
|
# Get acme.sh ACME client source
|
2018-12-31 12:53:21 +01:00
|
|
|
mkdir /src
|
2024-01-14 13:24:11 +01:00
|
|
|
git -C /src clone https://github.com/acmesh-official/acme.sh.git
|
2018-12-31 12:53:21 +01:00
|
|
|
cd /src/acme.sh
|
2020-11-17 23:06:14 +01:00
|
|
|
if [[ "$ACMESH_VERSION" != "master" ]]; then
|
|
|
|
git -c advice.detachedHead=false checkout "$ACMESH_VERSION"
|
|
|
|
fi
|
2018-12-31 12:53:21 +01:00
|
|
|
|
|
|
|
# Install acme.sh in /app
|
|
|
|
./acme.sh --install \
|
|
|
|
--nocron \
|
|
|
|
--auto-upgrade 0 \
|
|
|
|
--home /app \
|
|
|
|
--config-home /etc/acme.sh/default
|
|
|
|
|
|
|
|
# Make house cleaning
|
|
|
|
cd /
|
|
|
|
rm -rf /src
|
2020-11-17 17:51:56 +01:00
|
|
|
apk del .acmesh-deps
|