Sha256: 7139cef04b25cf0134f059bc5151ec1753abc2959c26fd8f7dd2bda92185ec8d

Contents?: true

Size: 619 Bytes

Versions: 6

Compression:

Stored size: 619 Bytes

Contents

module PoolParty    
  module Resources
        
    class Customservice < Resource
      
      default_options({
        :ensures => "running",
        :provider => "base"
      })
      
      def bin(arg)
        options.merge!(:binary => arg)
        options.merge!(:start => arg)
        options.merge!(:stop => arg.gsub(/start/, 'stop'))
        options.merge!(:restart => "#{arg.gsub(/start/, 'stop')} && #{arg}")
      end
                  
      def present
        "running"
      end
      def absent
        "stopping"
      end
      def class_type_name
        "Service"
      end
    end
    
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
auser-poolparty-1.1.1 lib/poolparty/resources/custom_service.rb
auser-poolparty-1.1.3 lib/poolparty/resources/custom_service.rb
auser-poolparty-1.1.4 lib/poolparty/resources/custom_service.rb
auser-poolparty-1.1.5 lib/poolparty/resources/custom_service.rb
fairchild-poolparty-1.1.3 lib/poolparty/resources/custom_service.rb
fairchild-poolparty-1.1.4 lib/poolparty/resources/custom_service.rb