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.088 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.087 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.086 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.085 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.084 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.083 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.082 lib/deprec/recipes/ddclient.rb
deprec-2.2.3 lib/deprec/recipes/ddclient.rb
deprec-2.2.2 lib/deprec/recipes/ddclient.rb
deprec-2.2.1 lib/deprec/recipes/ddclient.rb
deprec-2.2.0 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.081 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.080 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.079 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.078 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.077 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.076 lib/deprec/recipes/ddclient.rb
deprec-2.1.19 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.075 lib/deprec/recipes/ddclient.rb
le1t0-deprec-2.1.6.074 lib/deprec/recipes/ddclient.rb