From 371485e42058fc9b0ecc6a45f4f333a5377582ae Mon Sep 17 00:00:00 2001 From: "Matt K. Fu" Date: Tue, 2 Jul 2013 17:36:48 +0800 Subject: [PATCH] add handily task for service team --- lib/tasks/system_check.rake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lib/tasks/system_check.rake diff --git a/lib/tasks/system_check.rake b/lib/tasks/system_check.rake new file mode 100644 index 000000000..105788dba --- /dev/null +++ b/lib/tasks/system_check.rake @@ -0,0 +1,14 @@ +# encoding: utf-8 +namespace :system_check do + task :god_can_start => :environment do + unless File.directory? "/var/log/rulingcom" + puts "Creating Rulingcom log folder" + `sudo mkdir -p /var/log/rulingcom` + end + end + task :set_resque_namespace,[:namespace] => :environment do |t,args| + site = Site.first + site.resque_namespace = args[:namespace] + site.save + end +end