diff options
author | vipergts450 <[email protected]> | 2023-04-13 16:12:32 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2023-04-13 23:12:32 +0300 |
commit | 5863004441341599ccdfaed0c034151c9a3cab13 (patch) | |
tree | cc358a96aa195426af3633fe762a11b46b9e8cce /scripts/kvmd-certbot | |
parent | 99e4615d384cbffb09ffc445bf90423c7eeeecfe (diff) |
Update kvmd-certbot: fix cp -a to catch dotfiles (#127)
Second pull request for this bug. Apparently, in bash `cp -a <dir>/*` 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 <dir>/.` instead should catch dotfiles and all files and subdirectories correctly.
Diffstat (limited to 'scripts/kvmd-certbot')
-rwxr-xr-x | scripts/kvmd-certbot | 4 |
1 files 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 |