Skip to content

Commit

Permalink
Fix initial lego directory creation
Browse files Browse the repository at this point in the history
  • Loading branch information
kchristensen committed Jul 8, 2020
1 parent c4d5bc7 commit 7ced24e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions udm-le.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ LEGO_ARGS="--dns ${DNS_PROVIDER} --email ${CERT_EMAIL} ${HOSTS_ARGS} --key-type

case $1 in
initial)
if [ "$(stat -c '%u:%g' "${UDM_LE_PATH}/udm-le")" != "1000:1000" ]; then
mkdir "${UDM_LE_PATH}"/udm-le
chown 1000:1000 "${UDM_LE_PATH}"/udm-le
# Create lego directory so the container can write to it
if [ "$(stat -c '%u:%g' "${UDM_LE_PATH}/lego")" != "1000:1000" ]; then
mkdir "${UDM_LE_PATH}"/lego
chown 1000:1000 "${UDM_LE_PATH}"/lego
fi

echo 'Attempting initial certificate generation'
Expand Down

0 comments on commit 7ced24e

Please sign in to comment.