Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove old runit-based perl_service LWRP

  • Loading branch information...
commit f123f85c512cf611610618aa614a611f3df02547 1 parent 06cd543
@dagolden authored
View
54 cookbooks/perlbrew/providers/service.rb
@@ -1,54 +0,0 @@
-#
-# Author:: David A. Golden
-# Cookbook Name:: perlbrew
-# Provider:: perlbrew_service
-#
-# Copyright:: 2012, David A. Golden <dagolden@cpan.org>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-require 'chef/mixin/shell_out'
-require 'chef/mixin/language'
-include Chef::Mixin::ShellOut
-
-# XXX must be a fully qualified 'perl-5.X.Y@libname' style name
-action :create do
- perlbrew_env = {
- 'PERLBREW_ROOT' => node['perlbrew']['perlbrew_root'],
- 'PERLBREW_HOME' => node['perlbrew']['perlbrew_root']
- }
-
- my_perlbrew = new_resource.perlbrew
- my_cwd = new_resource.cwd
- my_user = new_resource.user
- my_group = new_resource.group
- my_command = new_resource.command
- my_env = new_resource.environment.merge(perlbrew_env)
-
- runit_service new_resource.name do
- template_name 'perlbrew-service'
- cookbook 'perlbrew'
- options(
- :perlbrew_root => node['perlbrew']['perlbrew_root'],
- :perlbrew => my_perlbrew,
- :user => my_user,
- :group => my_group,
- :command => my_command,
- :cwd => my_cwd
- )
- env my_env
- end
-end
-
-# :enable :disable :nothing :start :stop :restart :reload}
View
34 cookbooks/perlbrew/resources/service.rb
@@ -1,34 +0,0 @@
-#
-# Author:: David A. Golden
-# Cookbook Name:: perlbrew
-# Resource:: perlbrew_service
-#
-# Copyright:: 2012, David A. Golden <dagolden@cpan.org>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-actions :create
-
-attribute :perlbrew, :kind_of => String, :required => true
-attribute :command, :kind_of => String, :required => true
-attribute :user, :kind_of => String, :default => "nobody"
-attribute :group, :kind_of => String, :default => "nobody"
-attribute :cwd, :kind_of => String, :default => "/"
-attribute :environment, :kind_of => Hash, :default => {}
-
-def initialize(*args)
- super
- @action = :create
-end
-
Please sign in to comment.
Something went wrong with that request. Please try again.