Skip to content

Commit

Permalink
Add set -x under a debug flag
Browse files Browse the repository at this point in the history
  • Loading branch information
intentionally-left-nil committed Jul 23, 2023
1 parent 65bb3e8 commit 0ef7911
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ So. that's basically it :)
- `SKIP_BOOTSTRAP=1` means don't create any config files, or self-signed certs
- `SKIP_CREATE_CERTS=1` means don't call acme --issue to generate the SSL certificates
- `SKIP_WRITE_NGINX_CONF=1` means that /etc/reverse_proxy/nginx.conf is not overriden during the config process
- `DEBUG=1` means add verbose logging (set -x) to figure out what's going wrong

# Advanced configuration

Expand Down
4 changes: 3 additions & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
# shellcheck disable=SC2181

bootstrap_fn() {
set -x
if [ "${DEBUG:-}" = '1' ]; then
set -x
fi
data_dir=/etc/reverse_proxy/data
acme_dir="$data_dir/.acme.sh"
cert_dir="$data_dir/certs"
Expand Down
6 changes: 5 additions & 1 deletion create_certs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#! /bin/sh
# shellcheck disable=SC2181

set -x -u -o noglob
set -u -o noglob
if [ "${DEBUG:-}" = '1' ]; then
set -x
fi

{
if [ "${SKIP_CREATE_CERTS:-}" = "1" ]; then
echo "SKIP_CREATE_CERTS is set. Uninstalling the cron job without doing anything"
Expand Down
4 changes: 3 additions & 1 deletion init.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#! /bin/sh

init_fn() {
set -x
if [ "${DEBUG:-}" = '1' ]; then
set -x
fi
data_dir=/etc/reverse_proxy/data
acme_dir="$data_dir/.acme.sh"
nginx_file="/etc/reverse_proxy/nginx.conf"
Expand Down

0 comments on commit 0ef7911

Please sign in to comment.