poise-service 1.1.2 → 1.2.0

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
  SHA1:
3
- metadata.gz: 70bac9a58ca4e9151991e6dd844d0b726c199e46
4
- data.tar.gz: 9dea9ec820f77fcb19c2e35dacaabd507d4b240e
3
+ metadata.gz: df23a4a8ede0de9e681373515bed57755f804751
4
+ data.tar.gz: b2d13dc710b2bfc2b189b8538290f1a59b8251c2
5
5
  SHA512:
6
- metadata.gz: 7b3a43bd7c116da30a7b8cf55feeaf34622c2ad68fa2112046b662d4e7ddd69f805e4b9e04e9f787e2b13d33e66b652bbc8b66cde7ddc03bf4bc37252509fddc
7
- data.tar.gz: f6abcc0ef77e295afd954b662aa6dfc280bf8cdbcc759017593753602760b9fdbe9173853e459a8d5be7f20aff60e48bbac809024e10d8986021cc26fd5f7b13
6
+ metadata.gz: 95384f166b765557d77c789f621c1e5b20dd98ec0a23b28562d2a69b481d2a5a31c4543c5cc4b6bb0af39140e0cd84de309eadd2c57ae7cd20cafb9880082350
7
+ data.tar.gz: 66ccfaa5a980a5fa3affa46f1d82992dcb1fba1a4d9b5ea355703c3261c99d50f4dfc4ffb216102c3031b2a98424e19c9a93227d8981e14d41c9448fcbb5a4f6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Poise-Service Changelog
2
2
 
3
+ ## v1.2.0
4
+
5
+ * The `Restart` mode for systemd services can now be controlled via provider
6
+ option and defaults to `on-failure` to match other providers.
7
+
3
8
  ## v1.1.2
4
9
 
5
10
  * [#22](https://github.com/poise/poise-service/pull/22) Set all script commands
data/README.md CHANGED
@@ -320,6 +320,7 @@ end
320
320
  * `never_restart` – Never try to restart the service.
321
321
  * `never_reload` – Never try to reload the service.
322
322
  * `auto_reload` – Run `systemctl daemon-reload` after changes to the unit file. *(default: true)*
323
+ * `restart_mode` – Restart mode for the generated service unit. *(default: on-failure)*
323
324
 
324
325
  ### `inittab`
325
326
 
@@ -8,6 +8,7 @@ ExecReload=/bin/kill -<%= @reload_signal %> $MAINPID
8
8
  KillSignal=<%= @stop_signal %>
9
9
  User=<%= @user %>
10
10
  WorkingDirectory=<%= @directory %>
11
+ Restart=<%= @restart_mode %>
11
12
 
12
13
  [Install]
13
14
  WantedBy=multi-user.target
@@ -37,6 +37,8 @@ module PoiseService
37
37
  super.merge({
38
38
  # Automatically reload systemd on changes.
39
39
  auto_reload: true,
40
+ # Service restart mode.
41
+ restart_mode: 'on-failure',
40
42
  })
41
43
  end
42
44
 
@@ -68,7 +70,7 @@ module PoiseService
68
70
  reloader = systemctl_daemon_reload
69
71
  service_template("/etc/systemd/system/#{new_resource.service_name}.service", 'systemd.service.erb') do
70
72
  notifies :run, reloader, :immediately if options['auto_reload']
71
- variables.update(auto_reload: options['auto_reload'])
73
+ variables.update(auto_reload: options['auto_reload'], restart_mode: options['restart_mode'])
72
74
  end
73
75
  end
74
76
 
@@ -16,5 +16,5 @@
16
16
 
17
17
 
18
18
  module PoiseService
19
- VERSION = '1.1.2'
19
+ VERSION = '1.2.0'
20
20
  end
@@ -36,6 +36,7 @@ ExecReload=/bin/kill -HUP $MAINPID
36
36
  KillSignal=TERM
37
37
  User=root
38
38
  WorkingDirectory=/
39
+ Restart=on-failure
39
40
 
40
41
  [Install]
41
42
  WantedBy=multi-user.target
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poise-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Kantrowitz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-15 00:00:00.000000000 Z
11
+ date: 2016-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: halite
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  version: '0'
148
148
  requirements: []
149
149
  rubyforge_project:
150
- rubygems_version: 2.5.2
150
+ rubygems_version: 2.6.2
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: A Chef cookbook for managing system services.