class Cany::Recipes::WebServer

@!attribute user

@return [String, nil] The user name as which the web server process should
   executed

@!attribute group

@return [String, nil] The group name as which the web server process should
   executed

Attributes

group[RW]
user[RW]

Public Class Methods

new(*args) click to toggle source
Calls superclass method Cany::Recipe::new
# File lib/cany/recipes/web_server.rb, line 14
def initialize(*args)
  @user = 'www-data'
  @group = 'www-data'
  super
end

Public Instance Methods

binary() click to toggle source
# File lib/cany/recipes/web_server.rb, line 20
def binary
  recipe(:system).configure :service_pre_scripts, {
    mkdir_run: "mkdir -p /var/run/#{spec.name}",
    chown_run: "chown #{user}:#{group} /var/run/#{spec.name}"
  }
  install_service name, ["/usr/bin/#{spec.name}"] + launch_command, user: user, group: group
  inner.binary
end