Sha256: d6d7b42d10002585d8a46055757aeea977b752978ccefc639642a578ee068bdb
Contents?: true
Size: 830 Bytes
Versions: 12
Compression:
Stored size: 830 Bytes
Contents
module Cany::Recipes # @!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 class WebServer < Cany::Recipe attr_accessor :user, :group class DSL < Cany::Recipe::DSL delegate :user, :group end def initialize(*args) @user = 'www-data' @group = 'www-data' super end 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 end end
Version data entries
12 entries across 12 versions & 1 rubygems