standup 0.3.34 → 0.3.35

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.34
1
+ 0.3.35
@@ -0,0 +1,9 @@
1
+ check process postgresql with pidfile /var/run/postgresql/9.0-main.pid
2
+ group database
3
+ start program = "/etc/init.d/postgresql start"
4
+ stop program = "/etc/init.d/postgresql stop"
5
+ if failed unixsocket /var/run/postgresql/.s.PGSQL.5432 protocol pgsql then restart
6
+ if failed unixsocket /var/run/postgresql/.s.PGSQL.5432 protocol pgsql then alert
7
+ if failed host localhost port 5432 protocol pgsql then restart
8
+ if failed host localhost port 5432 protocol pgsql then alert
9
+ if 5 restarts within 5 cycles then timeout
@@ -16,8 +16,13 @@ Standup.script :node do
16
16
  :sudo => true
17
17
 
18
18
  tune_kernel
19
-
20
- sudo 'service postgresql restart'
19
+
20
+ with_processed_file script_file('postgresql_monit.conf') do |file|
21
+ scripts.monit.add_watch file
22
+ end
23
+
24
+ restart
25
+ # sudo 'service postgresql restart'
21
26
  end
22
27
 
23
28
  def exec_sql sql, local = false
@@ -45,6 +50,10 @@ Standup.script :node do
45
50
  def load_command database, username = 'postgres', *args
46
51
  "psql #{database} -U #{username} -w"
47
52
  end
53
+
54
+ def restart
55
+ scripts.monit.restart_watch 'postgresql'
56
+ end
48
57
 
49
58
  protected
50
59
 
data/standup.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{standup}
8
- s.version = "0.3.34"
8
+ s.version = "0.3.35"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ilia Ablamonov", "Artem Orlov", "Cloud Castle Inc."]
12
- s.date = %q{2011-05-17}
12
+ s.date = %q{2011-05-20}
13
13
  s.default_executable = %q{standup}
14
14
  s.email = %q{ilia@flamefork.ru}
15
15
  s.executables = ["standup"]
@@ -64,6 +64,7 @@ Gem::Specification.new do |s|
64
64
  "scripts/postgresql.rb",
65
65
  "scripts/postgresql/pg_hba.conf",
66
66
  "scripts/postgresql/postgresql.conf",
67
+ "scripts/postgresql/postgresql_monit.conf",
67
68
  "scripts/rake.rb",
68
69
  "scripts/redis.rb",
69
70
  "scripts/redis/redis-server",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standup
3
3
  version: !ruby/object:Gem::Version
4
- hash: 87
4
+ hash: 85
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 34
10
- version: 0.3.34
9
+ - 35
10
+ version: 0.3.35
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ilia Ablamonov
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-05-17 00:00:00 +04:00
20
+ date: 2011-05-20 00:00:00 +04:00
21
21
  default_executable: standup
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -198,6 +198,7 @@ files:
198
198
  - scripts/postgresql.rb
199
199
  - scripts/postgresql/pg_hba.conf
200
200
  - scripts/postgresql/postgresql.conf
201
+ - scripts/postgresql/postgresql_monit.conf
201
202
  - scripts/rake.rb
202
203
  - scripts/redis.rb
203
204
  - scripts/redis/redis-server