capistrano-unformatt 2.3 → 2.4
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.
- checksums.yaml +5 -5
- data/CHANGELOG.md +4 -0
- data/capistrano-unformatt.gemspec +1 -1
- data/lib/capistrano/tasks/puma.rake +1 -1
- data/lib/capistrano/tasks/setup.rake +3 -3
- data/lib/capistrano/tasks/sunspot.rake +1 -1
- data/lib/capistrano/tasks/unicorn.rake +1 -1
- data/vendor/templates/custom_service.daemon.erb +73 -0
- data/vendor/templates/puma.daemon.erb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cf7394ab6d227ffc9e5679391c7593d71ec765670f66688b6bdec47f2efdd2dc
|
4
|
+
data.tar.gz: 276f9fd7678661ef898f7988f998f9486fdce1fe23eca217eb0753b4973df26e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edfbb6d213debdb43b2d05ea23e7fdef3e91d899b8389b6be1013de2b8e7ded59ac69f7e40927625bbc77685eafdc46a64d0c84d38f4c0c036079c962c5dae02
|
7
|
+
data.tar.gz: 68b8a40c28dc139dd3ea18fefdb922cc616518f9d8122951500d3449205d6f52f93aae1d85e0439526fe23ef97d99af53e945f5c54e3630f670ce4932e09ed37
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "capistrano-unformatt"
|
7
|
-
spec.version = '2.
|
7
|
+
spec.version = '2.4'
|
8
8
|
spec.authors = ["unformatt"]
|
9
9
|
spec.email = ["unformatt@gmail.com"]
|
10
10
|
spec.description = "Custom recipes for Unformatt projects"
|
@@ -57,16 +57,16 @@ namespace :deploy do
|
|
57
57
|
task :all do
|
58
58
|
unless ENV['SKIP_YAMLS'] == 'true'
|
59
59
|
yaml_names_param = fetch(:setup_yamls, []).map { |x| x.to_s }.join('/')
|
60
|
-
invoke
|
60
|
+
invoke 'deploy:install:yaml', yaml_names_param
|
61
61
|
end
|
62
62
|
|
63
63
|
unless ENV['SKIP_DAEMONS'] == 'true'
|
64
64
|
daemon_names_param = fetch(:setup_daemons, []).map { |x| x[:name].to_s }.join('/')
|
65
|
-
invoke
|
65
|
+
invoke 'deploy:install:daemon', daemon_names_param
|
66
66
|
end
|
67
67
|
|
68
68
|
if fetch(:setup_nginx, false) == true
|
69
|
-
invoke
|
69
|
+
invoke 'deploy:install:nginx'
|
70
70
|
end
|
71
71
|
end
|
72
72
|
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# <%= "Start or stop #{fetch(:application)}-custom_service" %>
|
4
|
+
#
|
5
|
+
# <%= fetch(:daemon_author_name) %>
|
6
|
+
|
7
|
+
### BEGIN INIT INFO
|
8
|
+
# Provides: <%= "#{fetch(:application)}-custom_service" %>
|
9
|
+
# Required-Start: $local_fs $remote_fs $syslog $network
|
10
|
+
# Required-Stop: $local_fs $remote_fs $syslog $network
|
11
|
+
# Should-Start:
|
12
|
+
# Should-Stop:
|
13
|
+
# Default-Start: 2 3 4 5
|
14
|
+
# Default-Stop: 0 1 6
|
15
|
+
# Short-Description: <%= "Starts #{fetch(:application)}-custom_service" %>
|
16
|
+
# Description: <%= "Launches #{fetch(:application)}-custom_service" %>
|
17
|
+
### END INIT INFO
|
18
|
+
|
19
|
+
PATH=/home/<%=fetch(:monit_user)%>/.rbenv/shims:/home/<%=fetch(:monit_user)%>/.rbenv/bin:$PATH
|
20
|
+
PIDFILE=<%= "#{shared_path}/pids/custom_service.pid" %>
|
21
|
+
export RAILS_ENV=production
|
22
|
+
|
23
|
+
getPID() {
|
24
|
+
if [ ! -z `cat $PIDFILE 2> /dev/null` ]; then
|
25
|
+
if [[ ! -z $(ps -ef | grep -w `cat $PIDFILE` | grep custom_service | grep -v grep) ]]; then
|
26
|
+
echo `cat $PIDFILE 2> /dev/null`
|
27
|
+
fi
|
28
|
+
fi
|
29
|
+
}
|
30
|
+
|
31
|
+
case "$1" in
|
32
|
+
start)
|
33
|
+
echo -ne "<%= "Starting #{fetch(:application)}-custom_service..." %>"
|
34
|
+
|
35
|
+
if [ -z "$(getPID)" ]; then
|
36
|
+
cd <%=current_path%>
|
37
|
+
nohup bundle exec rake custom_service:start &> /dev/null &
|
38
|
+
|
39
|
+
echo "started!"
|
40
|
+
else
|
41
|
+
echo "is already running!"
|
42
|
+
fi
|
43
|
+
;;
|
44
|
+
|
45
|
+
stop)
|
46
|
+
echo -ne "<%= "Stopping #{fetch(:application)}-custom_service..." %>"
|
47
|
+
|
48
|
+
if [ -z "$(getPID)" ]; then
|
49
|
+
echo "is not running!"
|
50
|
+
else
|
51
|
+
cd <%=current_path%>
|
52
|
+
kill -TERM $(getPID) &> /dev/null
|
53
|
+
|
54
|
+
echo "stopped!"
|
55
|
+
fi
|
56
|
+
;;
|
57
|
+
|
58
|
+
restart)
|
59
|
+
$0 stop
|
60
|
+
sleep 3
|
61
|
+
$0 start
|
62
|
+
;;
|
63
|
+
|
64
|
+
check_pid)
|
65
|
+
if [ -z "$(getPID)" ]; then
|
66
|
+
> $PIDFILE
|
67
|
+
fi
|
68
|
+
;;
|
69
|
+
|
70
|
+
*)
|
71
|
+
echo "usage: $0 {start|stop|restart|check_pid}"
|
72
|
+
esac
|
73
|
+
exit 0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-unformatt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '2.
|
4
|
+
version: '2.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- unformatt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- lib/capistrano/unformatt/sidekiq.rb
|
73
73
|
- lib/capistrano/unformatt/sunspot.rb
|
74
74
|
- lib/capistrano/unformatt/unicorn.rb
|
75
|
+
- vendor/templates/custom_service.daemon.erb
|
75
76
|
- vendor/templates/logrotate.conf.erb
|
76
77
|
- vendor/templates/nginx.conf.erb
|
77
78
|
- vendor/templates/puma.daemon.erb
|
@@ -104,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
105
|
version: '0'
|
105
106
|
requirements: []
|
106
107
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.6
|
108
|
+
rubygems_version: 2.7.6
|
108
109
|
signing_key:
|
109
110
|
specification_version: 4
|
110
111
|
summary: Custom recipes for Unformatt projects
|