Skip to content

Commit

Permalink
fix: files exists in the container
Browse files Browse the repository at this point in the history
  • Loading branch information
Sando committed Oct 5, 2023
1 parent f65b634 commit 89d20f2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
23 changes: 13 additions & 10 deletions overlay/container/acmesh/etc/s6.d/cron/run
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,19 @@ echo '>> Generate initial TLS certificatets ...'
generate-certs.sh

## include TLS certificate paths into configuration yml
if [ -n "${ETURNAL_ETC_DIR+x}" ]
then config_file="$ETURNAL_ETC_DIR/eturnal.yml"
elif [ -f "/etc/eturnal.yml" ]
then config_file="/etc/eturnal.yml"
else config_file="$HOME/etc/eturnal.yml"
fi
cat >> $config_file <<-EOF
tls_crt_file: $(find $HOME -name fullchain.pem)
tls_key_file: $(find $HOME -name key.pem)
EOF
# if [ -n "${ETURNAL_ETC_DIR+x}" ]
# then config_file="$ETURNAL_ETC_DIR/eturnal.yml"
# elif [ -f "/etc/eturnal.yml" ]
# then config_file="/etc/eturnal.yml"
# else config_file="$HOME/etc/eturnal.yml"
# fi
# cat >> $config_file <<-EOF
# tls_crt_file: $(find $HOME -name fullchain.pem)
# tls_key_file: $(find $HOME -name key.pem)
# EOF

# One-time reload of eturnal to ensure usage of new TLS certificates.
# eturnalctl reload

while true; do
sleep <ACME_CRON_PERIOD>
Expand Down
6 changes: 6 additions & 0 deletions overlay/container/acmesh/usr/local/bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,11 @@ then cat >> $HOME/etc/eturnal.yml <<-EOF
EOF
fi

## include TLS certificate paths into configuration yml
then cat >> $HOME/etc/eturnal.yml <<-EOF
tls_crt_file: $(find $HOME -name fullchain.pem)
tls_key_file: $(find $HOME -name key.pem)
EOF

info 'Start main processes ...'
exec /bin/s6-svscan /etc/s6.d

0 comments on commit 89d20f2

Please sign in to comment.