<commit_before># Copyright 2006-2008 by <NAME>. All rights reserved.
Capistrano::Configuration.instance(:must_exist).load do 
  namespace :centos do namespace :monit do
        
  set :monit_user,  'monit'
  set :monit_group, 'monit'
  set :monit_confd_dir, '/etc/monit.d'
  
  set :monit_check_interval, 60
  set :monit_log, 'syslog facility log_daemon'
  set :monit_mailserver, nil
  set :monit_mail_from, '<EMAIL>@deprec.enabled.slice'
  set :monit_alert_recipients, %w(root@localhost)
  set :monit_timeout_recipients, %w(root@localhost)
  set :monit_webserver_enabled, true
  set :monit_webserver_port, 2812
  set :monit_webserver_address, 'localhost'
  set :monit_webserver_allowed_hosts_and_networks, %w(localhost)
  set :monit_webserver_auth_user, 'admin'
  set :monit_webserver_auth_pass, '<EMAIL>'
  
  # Upstream changes: http://www.tildeslash.com/monit/dist/CHANGES.txt  
  # rpmforge has packages of monit 4.9.2, let's use it instead of newest
  # version from sources
  
=begin
  SRC_PACKAGES[:monit] = {
    :filename => 'monit-4.10.1.tar.gz',   
    :md5sum => "d3143b0bbd79b53f1b019d2fc1dae656  monit-4.10.1.tar.gz", 
    :dir => 'monit-4.10.1',  
    :url => "http://www.tildeslash.com/monit/dist/monit-4.10.1.tar.gz",
    :unpack => "tar zxf monit-4.10.1.tar.gz;",
    :configure => %w(
      ./configure
      ;
      ).reject{|arg| arg.match '#'}.join(' '),
    :make => 'make;',
    :install => 'make install;'
  }
=end  

  desc "Install monit"
  task :install do
    install_deps
    yum.enable_repository(:rpmforge)
    apt.install( {:base => %w(monit)}, :stable )
    #deprec2.download_src(SRC_PACKAGES[:monit], src_dir)
    #deprec2.install_from_src(SRC_PACKAGES[:monit], src_dir)
    activate
  end
  
  # install dependencies for monit
  task :install_deps do<commit_msg>Updates from deprec2: removed call to :activate from :install task. The init script is currently copied out by the :config task however this is not run by :install.  [Mike Bailey]<commit_after># Copyright 2006-2008 by <NAME>. All rights reserved.
Capistrano::Configuration.instance(:must_exist).load do 
  namespace :centos do namespace :monit do
        
  set :monit_user,  'monit'
  set :monit_group, 'monit'
  set :monit_confd_dir, '/etc/monit.d'
  
  set :monit_check_interval, 60
  set :monit_log, 'syslog facility log_daemon'
  set :monit_mailserver, nil
  set :monit_mail_from, '<EMAIL>.slice'
  set :monit_alert_recipients, %w(root@localhost)
  set :monit_timeout_recipients, %w(root@localhost)
  set :monit_webserver_enabled, true
  set :monit_webserver_port, 2812
  set :monit_webserver_address, 'localhost'
  set :monit_webserver_allowed_hosts_and_networks, %w(localhost)
  set :monit_webserver_auth_user, 'admin'
  set :monit_webserver_auth_pass, '<EMAIL>'
  
  # Upstream changes: http://www.tildeslash.com/monit/dist/CHANGES.txt  
  # rpmforge has packages of monit 4.9.2, let's use it instead of newest
  # version from sources
  
=begin
  SRC_PACKAGES[:monit] = {
    :filename => 'monit-4.10.1.tar.gz',   
    :md5sum => "d3143b0bbd79b53f1b019d2fc1dae656  monit-4.10.1.tar.gz", 
    :dir => 'monit-4.10.1',  
    :url => "http://www.tildeslash.com/monit/dist/monit-4.10.1.tar.gz",
    :unpack => "tar zxf monit-4.10.1.tar.gz;",
    :configure => %w(
      ./configure
      ;
      ).reject{|arg| arg.match '#'}.join(' '),
    :make => 'make;',
    :install => 'make install;'
  }
=end  

  desc "Install monit"
  task :install do
    install_deps
    yum.enable_repository(:rpmforge)
    apt.install( {:base => %w(monit)}, :stable )
    #deprec2.download_src(SRC_PACKAGES[:monit], src_dir)
    #deprec2.install_from_src(SRC_PACKAGES[:monit], src_dir)
  end
  
  # install dependencies for monit
  task :install_deps do
{'fraction_non_alphanumeric': 0.13410064239828695, 'fraction_numerical': 0.0313169164882227, 'mean_word_length': 3.8595578673602082, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1332381', 'n_tokens_mistral': 1520, 'n_tokens_neox': 1427, 'n_words': 293}