Sha256: ff43cac789fc1f0430d57fecfdfaa00a44a2505881b4f53ed9cb78c00770f7c4
Contents?: true
Size: 650 Bytes
Versions: 7
Compression:
Stored size: 650 Bytes
Contents
require 'erb' module Commands class CreateWebserver extend Citrin::Helpers def self.run(app) @app = app template_file = webserver_template_file(@app.env) template = ERB.new(File.read(template_file), 0, "%<>") result = template.result(binding) `sudo sh -c 'echo "#{result}" > #{@app.webserver_config_file}'` `sudo ln -s #{@app.webserver_config_file} #{@app.webserver_link_file}` puts "Apache VirtualHost Konfiguration unter: #{@app.webserver_config_file}" puts "App Root unter: #{@app.app_root}" puts "URL: http://#{@app.url}" `sudo service apache2 reload` end end end
Version data entries
7 entries across 7 versions & 1 rubygems