diff --git a/README.md b/README.md index 01b4483..9dc73c7 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Create a config directory for your custom configs: mkdir conf.d ``` -And a `.conf` file such as in that directory: +And a `.conf` in that directory: ```nginx server { listen 443 ssl; @@ -43,7 +43,7 @@ services: environment: - CERTBOT_EMAIL=owner@company.com volumes: - - ./conf.d:/etc/nginx/user.conf.d + - ./conf.d:/etc/nginx/user.conf.d :ro ... ``` diff --git a/example/docker-compose.yml b/example/docker-compose.yml index 9e2a1af..3337320 100644 --- a/example/docker-compose.yml +++ b/example/docker-compose.yml @@ -10,4 +10,5 @@ services: - "80:80" - "443:443" volumes: - - ./conf.d:/etc/nginx/user.conf.d + - ./conf.d:/etc/nginx/user.conf.d :ro + diff --git a/src/scripts/util.sh b/src/scripts/util.sh index 02bff88..b96b149 100644 --- a/src/scripts/util.sh +++ b/src/scripts/util.sh @@ -96,8 +96,8 @@ is_renewal_required() { # to /etc/nginx/conf.d so they are included as configs # this allows a user to easily mount their own configs link_user_configs() { - SOURCE_DIR=${1-/etc/nginx/user.conf.d} - TARGET_DIR=${2-/etc/nginx/conf.d} + SOURCE_DIR="${1-/etc/nginx/user.conf.d}" + TARGET_DIR="${2-/etc/nginx/conf.d}" echo "symlinking scripts from ${SOURCE_DIR} to ${TARGET_DIR}" @@ -105,8 +105,7 @@ link_user_configs() { echo "no ${SOURCE_DIR}, nothing to do." else for conf in ${SOURCE_DIR}/*.conf; do - echo "symlinking: ${conf}" "${TARGET_DIR}/$(basename ${conf})" - ln -s "${conf}" "${TARGET_DIR}/$(basename ${conf})" + ln -sv "${conf}" "${TARGET_DIR}/$(basename ${conf})" done fi -} \ No newline at end of file +}