我正在尝试使用 Linux 创建一个加密的、按需增长的文件系统。我熟悉 LUKS 和 cryptsetup。
我可以创建一个空文件:
fallocate -l 512M /root/image
Run Code Online (Sandbox Code Playgroud)
我可以在其上创建一个 LUKS 容器:
cryptsetup -y luksFormat /root/image
Run Code Online (Sandbox Code Playgroud)
然后“打开”它:
cryptsetup luksOpen /root/image luksvolume
Run Code Online (Sandbox Code Playgroud)
此时,我可以在其上创建一个文件系统:
mkfs.ext4 -j /dev/mapper/luksvolume
Run Code Online (Sandbox Code Playgroud)
这一切都很好。但是,它没有解决问题的“按需增长”部分。
这个想法是在加密文件系统上复制 2Gb 文件将“扩展”图像,使其足够大以包含该文件。
甚至有可能做到吗?
我使用独立方法为多个域创建了多个 SSL 证书。我只对证书感兴趣,没有服务器集成。
他们现在正在更新。所以,我跑了:
certbot -d example.com --manual --preferred-challenges dns certonly
Run Code Online (Sandbox Code Playgroud)
并遵循每个域的说明(为每个域添加所需的 DNS 条目)。这样,我不必停止服务器并获得我的新证书。
我对这一切的(模糊)理解是,目前没有使用 DNS 质询自动更新证书的方法。或者您可能无法为“手动”方法自动更新证书?
无论如何,我写了这个脚本:
#!/bin/bash
for i in renewal/*;do
n=${i:8:-5};
echo $n;
# echo "\n" | certbot --text --agree-tos -d $n --manual --preferred-challenges dns --expand --renew-by-default --manual-public-ip-logging-ok certonly;
done
Run Code Online (Sandbox Code Playgroud)
此时,在renewal目录中所有域都有:
验证器 = 手册
和:
pref_challs = dns-01
Run Code Online (Sandbox Code Playgroud)
问题:
现在......当我运行“certbotrenew”时,它会在不使用我的脚本的情况下自动更新所有这些吗?
如何开始使用 DNS 质询实际创建新证书?