vlad-systemd 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2b4edafe312c07a334d11416ab9f468591ce0664
4
+ data.tar.gz: 940c0cda192f4a66ae5ee44e249b51af4cb99987
5
+ SHA512:
6
+ metadata.gz: dd9baab530c7a003681a4336ee8ffca7bb60e7e7214bbeb4311f6c35c03fccae13c0e62119731b310e014d6122e803f370d543e366d7d04b5202d0e88d29c148
7
+ data.tar.gz: 1c1c48cc9de6ce674c2c88fd9b3861d4bd28347a237254af55a8c3faab0afbcc8d731245b8d4e7bcbd947438de3f573db0b3649f74e9955a46eeee6274111cae
@@ -0,0 +1,20 @@
1
+ Copyright 2017 Matt Smith
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.
@@ -0,0 +1,34 @@
1
+ # vlad-systemd
2
+
3
+ ### Systemd vlad tasks
4
+
5
+ ## Dependencies
6
+
7
+ - vlad
8
+
9
+ ## Useage
10
+
11
+ ```ruby
12
+ # this is required... no pun intended
13
+ require 'vlad-systemd/systemd'
14
+
15
+ # if target is 'myapp.target', specify 'myapp'
16
+ set :descriptor, 'NAME OF SYSTEMD TARGET'
17
+
18
+ # optional
19
+ set :sudo_cmd, 'sudo'
20
+ ```
21
+
22
+ ```shell
23
+ rake vlad:systemd:start
24
+ rake vlad:systemd:stop
25
+ rake vlad:systemd:restart
26
+ ```
27
+
28
+ ## Contributors
29
+
30
+ - Matt Smith, Near Apogee Consulting (www.nearapogee.com)
31
+
32
+ ## License
33
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
34
+
@@ -0,0 +1,5 @@
1
+ set :descriptor, nil
2
+ set :sudo_cmd, 'sudo'
3
+
4
+ module VladSystemd
5
+ end
@@ -0,0 +1,20 @@
1
+ namespace :vlad do
2
+ namespace :systemd do
3
+
4
+ desc 'Start app.'
5
+ remote_task :start, :roles => :app do
6
+ run "#{sudo_cmd} systemctl start #{descriptor}.target"
7
+ end
8
+
9
+ desc 'Stop app.'
10
+ remote_task :stop, :roles => :app do
11
+ run "#{sudo_cmd} systemctl stop #{descriptor}.target"
12
+ end
13
+
14
+ desc 'Restart app.'
15
+ remote_task :restart, :roles => :app do
16
+ run "#{sudo_cmd} systemctl restart #{descriptor}.target"
17
+ end
18
+ end
19
+ end
20
+
@@ -0,0 +1,3 @@
1
+ module VladSystemd
2
+ VERSION = '0.1.0'
3
+ end
metadata ADDED
@@ -0,0 +1,63 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vlad-systemd
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Matt Smith
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-08-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: vlad
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.0.0
27
+ description: Start, stop, restart a systemd target.
28
+ email:
29
+ - matt@nearapogee.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - MIT-LICENSE
35
+ - README.md
36
+ - lib/vlad-systemd.rb
37
+ - lib/vlad-systemd/systemd.rb
38
+ - lib/vlad-systemd/version.rb
39
+ homepage: https://github.com/nearapogee/vlad-systemd
40
+ licenses:
41
+ - MIT
42
+ metadata: {}
43
+ post_install_message:
44
+ rdoc_options: []
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ requirements: []
58
+ rubyforge_project:
59
+ rubygems_version: 2.6.11
60
+ signing_key:
61
+ specification_version: 4
62
+ summary: Control a systemd target.
63
+ test_files: []