add script for creating VM image
This commit is contained in:
parent
9c3189544a
commit
75c3228c5e
8 changed files with 196 additions and 2 deletions
13
lib/certbot.rb
Normal file
13
lib/certbot.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue