specinfra 2.82.11 → 2.82.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/specinfra/command.rb +2 -0
- data/lib/specinfra/command/alpine/base/service.rb +1 -27
- data/lib/specinfra/command/gentoo/base/service.rb +1 -8
- data/lib/specinfra/command/module/openrc.rb +11 -0
- data/lib/specinfra/command/module/service/openrc.rb +41 -0
- data/lib/specinfra/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e24b651bd8873cb6156894c361501ccf9a92d85
|
4
|
+
data.tar.gz: 8adcb23c21275ccf94fdb42bea6291381ff9891e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 035225f56e38e494f3eaca7d47069b631f82f5aadae1ace7ca37f244453f8c1d86ad6f201fc7d176bc9ea70a58b450debae33ea1fe80d11a2cf9555f4d689409
|
7
|
+
data.tar.gz: 78d124e8f6b8e4188857f2f95605b2a26aaffe956338da9d420b5edf4c55645d1340f79d4def0630a477a3cb1e5de12f71f3b16f0e7693c01ce57d4e72006307
|
data/lib/specinfra/command.rb
CHANGED
@@ -14,9 +14,11 @@ require 'specinfra/command/module/service/runit'
|
|
14
14
|
require 'specinfra/command/module/service/monit'
|
15
15
|
require 'specinfra/command/module/service/god'
|
16
16
|
require 'specinfra/command/module/service/delegator'
|
17
|
+
require 'specinfra/command/module/service/openrc'
|
17
18
|
require 'specinfra/command/module/systemd'
|
18
19
|
require 'specinfra/command/module/zfs'
|
19
20
|
require 'specinfra/command/module/ss'
|
21
|
+
require 'specinfra/command/module/openrc'
|
20
22
|
|
21
23
|
# Base
|
22
24
|
require 'specinfra/command/base'
|
@@ -1,31 +1,5 @@
|
|
1
1
|
class Specinfra::Command::Alpine::Base::Service < Specinfra::Command::Linux::Base::Service
|
2
2
|
class << self
|
3
|
-
|
4
|
-
"rc-update show boot default | grep -w #{escape(service)}"
|
5
|
-
end
|
6
|
-
|
7
|
-
def check_is_running(service)
|
8
|
-
"/etc/init.d/#{escape(service)} status"
|
9
|
-
end
|
10
|
-
|
11
|
-
def enable(service)
|
12
|
-
"rc-update add #{escape(service)}"
|
13
|
-
end
|
14
|
-
|
15
|
-
def disable(service)
|
16
|
-
"rc-update del #{escape(service)}"
|
17
|
-
end
|
18
|
-
|
19
|
-
def start(service)
|
20
|
-
"rc-service #{escape(service)} start"
|
21
|
-
end
|
22
|
-
|
23
|
-
def stop(service)
|
24
|
-
"rc-service #{escape(service)} stop"
|
25
|
-
end
|
26
|
-
|
27
|
-
def restart(service)
|
28
|
-
"rc-service #{escape(service)} restart"
|
29
|
-
end
|
3
|
+
include Specinfra::Command::Module::OpenRC
|
30
4
|
end
|
31
5
|
end
|
@@ -1,13 +1,6 @@
|
|
1
1
|
class Specinfra::Command::Gentoo::Base::Service < Specinfra::Command::Linux::Base::Service
|
2
2
|
class << self
|
3
|
-
|
4
|
-
regexp = /\s*#{service}\s*\|\s*(boot|default)/
|
5
|
-
"rc-update show | grep -- #{escape(regexp)}"
|
6
|
-
end
|
7
|
-
|
8
|
-
def check_is_running(service)
|
9
|
-
"/etc/init.d/#{escape(service)} status"
|
10
|
-
end
|
3
|
+
include Specinfra::Command::Module::OpenRC
|
11
4
|
end
|
12
5
|
end
|
13
6
|
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Specinfra
|
2
|
+
module Command
|
3
|
+
module Module
|
4
|
+
module Service
|
5
|
+
module OpenRC
|
6
|
+
def check_is_enabled_under_openrc(service, level=3)
|
7
|
+
"rc-update show boot default | grep -w #{escape(service)}"
|
8
|
+
end
|
9
|
+
|
10
|
+
def check_is_running_under_openrc(service)
|
11
|
+
"/etc/init.d/#{escape(service)} status"
|
12
|
+
end
|
13
|
+
|
14
|
+
def enable_under_openrc(service)
|
15
|
+
"rc-update add #{escape(service)}"
|
16
|
+
end
|
17
|
+
|
18
|
+
def disable_under_openrc(service)
|
19
|
+
"rc-update del #{escape(service)}"
|
20
|
+
end
|
21
|
+
|
22
|
+
def start_under_openrc(service)
|
23
|
+
"rc-service #{escape(service)} start"
|
24
|
+
end
|
25
|
+
|
26
|
+
def stop_under_openrc(service)
|
27
|
+
"rc-service #{escape(service)} stop"
|
28
|
+
end
|
29
|
+
|
30
|
+
def restart_under_openrc(service)
|
31
|
+
"rc-service #{escape(service)} restart"
|
32
|
+
end
|
33
|
+
|
34
|
+
def reload_under_openrc(service)
|
35
|
+
"/etc/init.d/#{escape(service)} reload"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/lib/specinfra/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specinfra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.82.
|
4
|
+
version: 2.82.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
@@ -307,11 +307,13 @@ files:
|
|
307
307
|
- lib/specinfra/command/linuxmint.rb
|
308
308
|
- lib/specinfra/command/linuxmint/base.rb
|
309
309
|
- lib/specinfra/command/module.rb
|
310
|
+
- lib/specinfra/command/module/openrc.rb
|
310
311
|
- lib/specinfra/command/module/service/daemontools.rb
|
311
312
|
- lib/specinfra/command/module/service/delegator.rb
|
312
313
|
- lib/specinfra/command/module/service/god.rb
|
313
314
|
- lib/specinfra/command/module/service/init.rb
|
314
315
|
- lib/specinfra/command/module/service/monit.rb
|
316
|
+
- lib/specinfra/command/module/service/openrc.rb
|
315
317
|
- lib/specinfra/command/module/service/runit.rb
|
316
318
|
- lib/specinfra/command/module/service/supervisor.rb
|
317
319
|
- lib/specinfra/command/module/service/systemd.rb
|