kazutanaka-ttcluster 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ 2008-09-10 (0.1.3)
2
+ * Switch group as well as user
3
+ * Add monitrc.sample
4
+
1
5
  2008-09-09 (0.1.2)
2
6
  * Add 'restart' command
3
7
  * Show ttbase dir on 'config' command
data/MANIFEST CHANGED
@@ -1,7 +1,9 @@
1
1
  ChangeLog
2
2
  MANIFEST
3
+ MIT-LICENSE
3
4
  README
4
5
  Rakefile
6
+ TODO
5
7
  bin/ttcluster
6
8
  lib/ttcluster.rb
7
9
  lib/ttcluster/base_command.rb
@@ -17,5 +19,6 @@ lib/ttcluster/status_command.rb
17
19
  lib/ttcluster/stop_command.rb
18
20
  lib/ttcluster/version.rb
19
21
  sample/logrotate.sample
22
+ sample/monitrc.sample
20
23
  test/test_ttcluster.rb
21
24
  ttcluster.gemspec
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2008 Kazuhiro Tanaka
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README CHANGED
@@ -1,7 +1,3 @@
1
1
  = Tokyo Tyrant Cluster
2
2
 
3
- == Introduction
4
-
5
- == Copyright
6
-
7
3
 
data/TODO ADDED
@@ -0,0 +1,2 @@
1
+ * README
2
+ * exit code
@@ -81,7 +81,9 @@ module TTCluster
81
81
 
82
82
  def switch_user
83
83
  return unless @user
84
- Process.euid = Etc.getpwnam(@user).uid
84
+ uid, gid = lambda {|pw| [pw.uid, pw.gid]}[Etc.getpwnam(@user)]
85
+ Process.egid = gid
86
+ Process.euid = uid
85
87
  rescue ArgumentError
86
88
  error(ERR_ILLEGAL_USER % @user, 1)
87
89
  rescue Errno::EPERM
@@ -4,7 +4,7 @@
4
4
 
5
5
  module TTCluster
6
6
  GEM_NAME = "ttcluster"
7
- VERSION = "0.1.2"
7
+ VERSION = "0.1.3"
8
8
  SUMMARY = "Tokyo Tyrant cluster administration tool"
9
9
  DESCRIPTION = SUMMARY
10
10
  end
@@ -0,0 +1,9 @@
1
+ check process ttcluster-1978 with pidfile /var/ttcluster/pids/1978.pid
2
+ start program = "/usr/bin/ttcluster -u nobody -d /var/ttcluster start 1978"
3
+ stop program = "/usr/bin/ttcluster -u nobody -d /var/ttcluster stop 1978"
4
+ group ttcluster
5
+
6
+ check process ttcluster-1979 with pidfile /var/ttcluster/pids/1979.pid
7
+ start program = "/usr/bin/ttcluster -u nobody -d /var/ttcluster start 1979"
8
+ stop program = "/usr/bin/ttcluster -u nobody -d /var/ttcluster stop 1979"
9
+ group ttcluster
@@ -7,7 +7,7 @@
7
7
  # Constants
8
8
  #
9
9
  GEM_NAME = "ttcluster"
10
- PKG_VERSION = "0.1.2"
10
+ PKG_VERSION = "0.1.3"
11
11
  SUMMARY = "Tokyo Tyrant cluster administration tool"
12
12
  DESCRIPTION = SUMMARY
13
13
  AUTHOR = "kazutanaka"
@@ -35,8 +35,10 @@ GEM_SPEC = Gem::Specification.new do |s|
35
35
  %w(
36
36
  ChangeLog
37
37
  MANIFEST
38
+ MIT-LICENSE
38
39
  README
39
40
  Rakefile
41
+ TODO
40
42
  bin/ttcluster
41
43
  lib/ttcluster.rb
42
44
  lib/ttcluster/base_command.rb
@@ -52,6 +54,7 @@ lib/ttcluster/status_command.rb
52
54
  lib/ttcluster/stop_command.rb
53
55
  lib/ttcluster/version.rb
54
56
  sample/logrotate.sample
57
+ sample/monitrc.sample
55
58
  test/test_ttcluster.rb
56
59
  ttcluster.gemspec
57
60
  )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kazutanaka-ttcluster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - kazutanaka
@@ -38,8 +38,10 @@ extra_rdoc_files:
38
38
  files:
39
39
  - ChangeLog
40
40
  - MANIFEST
41
+ - MIT-LICENSE
41
42
  - README
42
43
  - Rakefile
44
+ - TODO
43
45
  - bin/ttcluster
44
46
  - lib/ttcluster.rb
45
47
  - lib/ttcluster/base_command.rb
@@ -55,6 +57,7 @@ files:
55
57
  - lib/ttcluster/stop_command.rb
56
58
  - lib/ttcluster/version.rb
57
59
  - sample/logrotate.sample
60
+ - sample/monitrc.sample
58
61
  - test/test_ttcluster.rb
59
62
  - ttcluster.gemspec
60
63
  has_rdoc: true