Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try and warn about confs looking at /etc for certs #532

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/init-outdated-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ if [[ -f /config/nginx/ldap.conf ]]; then
Ensure your configs are updated and remove /config/nginx/ldap.conf
If you do not use this config, simply remove it."
fi
if grep -qrle ' /etc/letsencrypt' /config/nginx; then
echo " The following nginx confs are using certificates from the obsolete location
/etc/letsencrypt and should be updated to point to /config/etc/letsencrypt
"
echo -n " " && grep -rle ' /etc/letsencrypt' /config/nginx
fi
6 changes: 3 additions & 3 deletions root/migrations/02-swag-old-certbot-paths
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

# Migrate existing confs with old paths from /etc/letsencrypt to /config/etc/letsencrypt
if [[ ! -f "/config/etc/letsencrypt/02-swag-old-certbot-paths" ]] && ls /config/etc/letsencrypt/renewal/*.conf >/dev/null 2>&1; then
sed -i 's| /etc/letsencrypt| /config/etc/letsencrypt|' /config/etc/letsencrypt/renewal/*.conf && touch /config/etc/letsencrypt/02-swag-old-certbot-paths
# Migrate existing renewal confs with old paths from /etc/letsencrypt to /config/etc/letsencrypt
if ls /config/etc/letsencrypt/renewal/*.conf >/dev/null 2>&1; then
sed -i 's| /etc/letsencrypt| /config/etc/letsencrypt|' /config/etc/letsencrypt/renewal/*.conf
fi
Loading