Sha256: 56b5448c4103a1111f7f7c6129e7f15d8a08f1b8f5e8d59bf17efd45eaa5b90b

Contents?: true

Size: 1.46 KB

Versions: 125

Compression:

Stored size: 1.46 KB

Contents

# Copyright 2006-2008 by Mike Bailey. All rights reserved.
Capistrano::Configuration.instance(:must_exist).load do 
  namespace :deprec do
    namespace :ddclient do
      
      set(:ddclient_user) { Capistrano::CLI.ui.ask "Enter ddclient username" }
      set(:ddclient_pass) { Capistrano::CLI.ui.ask "Enter ddclient password" }
      set(:ddclient_domains) { Capistrano::CLI.ui.ask "Enter ddclient domain" }
      set(:ddclient_interface) { 
        Capistrano::CLI.ui.ask "Enter ddclient interface" do |q|
          q.default = 'eth0'
        end 
      }
      
      desc "Install ddclient"
      task :install do
        install_deps
      end
      
      # install dependencies for ddclient
      task :install_deps do
        apt.install( {:base => %w(ddclient)}, :stable )
      end
      
      SYSTEM_CONFIG_FILES[:ddclient] = [
        { :template => "ddclient.conf.erb",
          :path => '/etc/ddclient.conf',
          :mode => 0600,
          :owner => 'root:root'},
          
        { :template => "ddclient.erb",
          :path => '/etc/default/ddclient',
          :mode => 0600,
          :owner => 'root:root'}
      ]
      
      desc "Update system networking configuration"
      task :config do
        SYSTEM_CONFIG_FILES[:ddclient].each do |file|
          deprec2.render_template(:ddclient, file.merge(:remote=>true))
        end
        start
      end
      
      task :start do
        sudo '/etc/init.d/ddclient start'
      end
      
    end
  end
end

Version data entries

125 entries across 125 versions & 3 rubygems

Version Path
le1t0-deprec-2.1.6.073 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.072 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.071 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.070 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.069 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.068 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.067 lib/deprec/recipes/ddclient.rb
deprec-2.1.18 lib/deprec/recipes/ddclient.rb
deprec-2.1.17 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.066 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.065 lib/deprec/recipes/ddclient.rb
deprec-2.1.16 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.064 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.063 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.062 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.061 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.059 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.058 lib/deprec/recipes/ddclient.rb
deprec-2.1.14 lib/deprec/recipes/ddclient.rb
deprec-2.1.13 lib/deprec/recipes/ddclient.rb