From 5863004441341599ccdfaed0c034151c9a3cab13 Mon Sep 17 00:00:00 2001 From: vipergts450 <60085845+vipergts450@users.noreply.github.com> Date: Thu, 13 Apr 2023 16:12:32 -0400 Subject: Update kvmd-certbot: fix cp -a to catch dotfiles (#127) Second pull request for this bug. Apparently, in bash `cp -a /*` ignores dotfiles, which are often how authfiles get named, notably as per the documentation for SSL cert management for certbot plugins in the PiKVM Wiki. Using `cp -a /.` instead should catch dotfiles and all files and subdirectories correctly. --- scripts/kvmd-certbot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kvmd-certbot b/scripts/kvmd-certbot index 594c92e0..f9c39cdc 100755 --- a/scripts/kvmd-certbot +++ b/scripts/kvmd-certbot @@ -108,7 +108,7 @@ case "$1" in renew) shift create_tmp - cp -a "$cur"/* "$tmp" + cp -a "$cur"/. "$tmp" chown -R "$user:" "$tmp" sed -s -i -e "s| = $cur/| = $tmp/|g" "$tmp/config/renewal/"* sudo --preserve-env -u "$user" certbot renew "$@" \ @@ -120,7 +120,7 @@ case "$1" in sudo --preserve-env -u "$user" kvmd-pstrun -- bash -c " set -ex rm -rf '$new' - cp -a '$tmp' '$new' + cp -a '$tmp'/. '$new' rm '$new/updated' chmod 755 '$new/config/'{archive,live} chmod 640 '$new'/config/archive/*/privkey*.pem -- cgit v1.2.3