carnac 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/carnac CHANGED
@@ -25,4 +25,10 @@ OptionParser.new do |opts|
25
25
  end
26
26
  end.parse!
27
27
 
28
- Carnac::Check.new(options).run!
28
+ puts ENV['USER']
29
+
30
+ if (ENV['USER'] == "root")
31
+ Carnac::Check.new(options).run!
32
+ else
33
+ STDERR.puts "ERROR: Try sudo carnac [options] ..."
34
+ end
data/lib/carnac/check.rb CHANGED
@@ -59,9 +59,9 @@ END_OF_MESSAGE
59
59
  msg << " (#{data['Current_Pending_Sector']} pending)"
60
60
  end
61
61
  if @notify.empty?
62
- send_email "#{@notify}", :body => msg
63
- else
64
62
  puts msg
63
+ else
64
+ send_email "#{@notify}", :body => msg
65
65
  end
66
66
  end
67
67
 
@@ -1,3 +1,3 @@
1
1
  module Carnac
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carnac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: