This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
######################################################################### | |
# # | |
# Script for finding neighbor web servers in local network # | |
# # | |
# Author: Hugo Duksis <[email protected]> # | |
# Usage: python neighbor_search.py | |
# TODO: move pinging in multiple treads to increase performance # | |
# # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :jobs do | |
#bundle exec rake delayed_job:monit RAILS_ENV=demo | |
desc "Monitor delayed_job processes." | |
task :monit => :environment do | |
@server_name = `uname -n`.split("\n").first | |
@application_name = Rails.application.class.parent_name | |
delayed_job_found = Hash.new | |
def do_alert(msg) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :deploy do | |
desc "Configure logrotate" | |
task :logrotate, :roles => :install do | |
config_file = "/etc/logrotate.d/app_#{rails_env}" | |
config_lines = ["daily", | |
"rotate 10", | |
"missingok", | |
"nocompress", | |
"sharedscripts", |
NewerOlder