summaryrefslogtreecommitdiff
path: root/x/ssl
blob: 6976038941a6714b67af4f5545f24d03c094fc99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh -eu

# 1. Change $SERVER to the prod value commented out
# 2. Get and save a Linode API token to "$HOME/.linode"
# 3. srv/x/ssl run
# 4. Set up a cronjob to run "srv/x/ssl renew"
# Cron Example: (04:00 every first day of the month)
#    0 4 1 * * srv/x/ssl renew

EMAIL="letsencryptqn6kcyl5@ebc.li"
SERVER="https://acme-staging-v02.api.letsencrypt.org/directory" # staging
#SERVER="https://acme-v02.api.letsencrypt.org/directory" # prod

export LINODE_TOKEN_FILE="$HOME/.linode"

if [ ! -e "$LINODE_TOKEN_FILE" ]; then
    echo "File '$LINODE_TOKEN_FILE' missing! Put your token there and try again"
    exit 1
fi

exec lego \
    --server "$SERVER" \
    --dns linode \
    --domains ecmelberk.com --domains *.ecmelberk.com \
    --domains ebc.li --domains *.ebc.li \
    --accept-tos \
    --email "$EMAIL" \
    --path "$HOME/ssl" \
    "$1"