add script for creating VM image

This commit is contained in:
Artur Gurgul1 2025-08-09 18:10:34 +02:00
parent 9c3189544a
commit 75c3228c5e
8 changed files with 196 additions and 2 deletions

13
lib/certbot.rb Normal file
View file

@ -0,0 +1,13 @@
module Certbot
def self.create_certificate(domain, wildcard = false)
command = "/home/artur/.dat/bin/certbot"
if wildcard
system "sudo #{command} certonly --manual --preferred-challenges=dns -d \"*.#{domain}\" -d \"#{domain}\""
else
system "sudo #{command} --nginx -d #{domain}"
end
end
end