Sha256: 3ebf87b10d45d7a5aacfa988e33e69cab5aac2ad29f427a04f10ffe01d37e59b
Contents?: true
Size: 815 Bytes
Versions: 2
Compression:
Stored size: 815 Bytes
Contents
module Cany module Recipes class WebServer < Recipe def binary File.open File.join('debian', "#{spec.name}.upstart"), 'w' do |f| f.write "description \"#{spec.description}\"\n" f.write "start on filesystem or runlevel [2345]\n" f.write "stop on runlevel [!2345]\n" f.write "respawn\n" f.write "respawn limit 10 5\n" f.write "umask 022\n" f.write "chdir /usr/share/#{spec.name}\n" f.write "pre-start script\n" f.write "\tmkdir -p /var/run/#{spec.name}\n" f.write "\tchown www-data /var/run/#{spec.name}\n" f.write "end script\n" f.write "exec su www-data --shell /usr/bin/#{spec.name} -- #{launch_command}\n" end inner.binary end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cany-0.0.2 | lib/cany/recipes/web_server.rb |
cany-0.0.1 | lib/cany/recipes/web_server.rb |