itamae-plugin-recipe-god 0.2.3 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e57020b07876d49f59fd02e085931cb57302c58b6ab450d9f9b6fc160d5613ce
4
- data.tar.gz: 2d76efe2b0b9ea86fb872050977a2b167f46cb2cdb50baa490d866847b078aea
3
+ metadata.gz: 245430e7055f897fa389e0aeec9fffd1724b031988001100b301876dec289d8e
4
+ data.tar.gz: e5a73d60a8c8c5beb26d715f6abd0c76e8be8b5d3dd5cfc8dbd6a4acc92c1f13
5
5
  SHA512:
6
- metadata.gz: 18109242288a7fe08955b40a9029799e8b3b2855315a46c7adb1840c27c263d2505b7bdeed1447048366fc17f1a4c25d74e69c740dd78ff2f0fa517452dac5be
7
- data.tar.gz: b08f0a1f0502f833772bef9b552ee763f5b78660e9471ccec0906b3215c909170b7f92ac2d5f365b284a2086ebe6bedc5651cce7906563a3698cc2e9c13fe736
6
+ metadata.gz: 047b27c798e863018afe57a9212216b570a641213fc8cf844aeae5ee6e350817f52776437b38fa0b7d67e46581460636427cf1ca6aa0b8fa570496b97001aa12
7
+ data.tar.gz: '0423694d749c5235f49a493d97488af9bc690d0995841a8ef89787a25792df04d57b6d33ca3202a22b8ee668564e067987f56866fc534769bb9d8836bfd5eafe'
@@ -40,7 +40,9 @@ template '/etc/god/master.conf' do
40
40
  mode '644'
41
41
  end
42
42
 
43
+ ruby_bin_dir = node.languages.ruby.bin_dir rescue nil
43
44
  service_variables = {
45
+ god_bin: (ruby_bin_dir ? "#{ruby_bin_dir}/god" : 'god'),
44
46
  pid: '/var/run/god.pid',
45
47
  config: '/etc/god/master.conf',
46
48
  log: '/var/log/god.log',
@@ -8,6 +8,7 @@
8
8
 
9
9
  . /etc/rc.d/init.d/functions
10
10
 
11
+ GOD_BIN=<%= @god_bin %>
11
12
  PID=<%= @pid %>
12
13
  CONFIG=<%= @config %>
13
14
  LOG=<%= @log %>
@@ -17,27 +18,27 @@ RETVAL=0
17
18
  case "$1" in
18
19
  start)
19
20
  echo -n 'Starting god: '
20
- god -P $PID -c $CONFIG -l $LOG --log-level <%= @log_level %>
21
+ $GOD_BIN -P $PID -c $CONFIG -l $LOG --log-level <%= @log_level %>
21
22
  echo
22
23
  RETVAL=$?
23
24
  ;;
24
25
  stop)
25
26
  echo -n 'Stopping god: '
26
- god quit
27
+ $GOD_BIN quit
27
28
  echo
28
29
  RETVAL=$?
29
30
  ;;
30
31
  restart)
31
32
  echo -n 'Stopping god: '
32
- god quit
33
+ $GOD_BIN quit
33
34
  echo
34
35
  echo -n 'Starting god: '
35
- god -P $PID -c $CONFIG -l $LOG --log-level <%= @log_level %>
36
+ $GOD_BIN -P $PID -c $CONFIG -l $LOG --log-level <%= @log_level %>
36
37
  echo
37
38
  RETVAL=$?
38
39
  ;;
39
40
  status)
40
- god status
41
+ $GOD_BIN status
41
42
  RETVAL=$?
42
43
  ;;
43
44
  *)
@@ -3,9 +3,14 @@ Description=God: A process monitoring framework in Ruby
3
3
  After=network.target
4
4
 
5
5
  [Service]
6
- PIDFile=<%= @pid %>
7
- ExecStart=<%= `which god`.chomp %> -c <%= @config %> -P <%= @pid %> -l <%= @log %> --log-level <%= @log_level %>
8
- ExecStop=<%= `which god`.chomp %> quit
6
+ Environment="CONF_FILE=<%= @config %>"
7
+ Environment="PID_FILE=<%= @pid %>"
8
+ Environment="LOG_FILE=<%= @log %>"
9
+ Environment="LOG_LEVEL=<%= @pid %>"
10
+ EnvironmentFile=-/etc/sysconfig/god
11
+ PIDFile=$PID_FILE
12
+ ExecStart=<%= @god_bin %> -c $CONF_FILE -P $PID_FILE -l $LOG_FILE --log-level $LOG_LEVEL
13
+ ExecStop=<%= @god_bin %> quit
9
14
 
10
15
  [Install]
11
16
  WantedBy=multi-user.target
@@ -2,7 +2,7 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module God
5
- VERSION = '0.2.3'
5
+ VERSION = '0.2.5'
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae-plugin-recipe-god
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - y-matsuda
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-10 00:00:00.000000000 Z
11
+ date: 2024-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: itamae