Class: Snippy::Apache

Inherits:
Thor
  • Object
show all
Defined in:
lib/snippy/apache.rb

Instance Method Summary collapse

Instance Method Details

#certificate(filename) ⇒ Object



7
8
9
10
11
12
# File 'lib/snippy/apache.rb', line 7

def certificate(filename)
  system "openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout #{filename}.key -out #{filename}.crt"
  puts "Generated files:"
  puts "  #{filename}.key"
  puts "  #{filename}.crt"
end