pleaserun 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pleaserun/platform/upstart.rb +4 -1
- data/pleaserun.gemspec +1 -1
- data/templates/sysv/lsb-3.1/init.sh +10 -1
- data/test/helpers.rb +10 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6db755c281a2e5f041c547f22b425ca854f75d8b
|
4
|
+
data.tar.gz: 1cdf25e749553dccdc7204c0a68ce167dc56e77e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd618ba975af6c590ce5c934e1480e28f6b11cd86f68d84ebd600b5b483afbd7173780e05de5fa3402ffe95c8edc7414a57e61de973624f5737a96696db49c67
|
7
|
+
data.tar.gz: 1652915321ccd1c26b07dade2ffb840da8416ab19cf8e6e7f3fc1ad0b49872372038ee8393734c057dfbb9fc242996d97a81a62dc1422189b15c9404a7569a1c
|
@@ -7,7 +7,10 @@ class PleaseRun::Platform::Upstart < PleaseRun::Platform::Base
|
|
7
7
|
def files
|
8
8
|
return Enumerator::Generator.new do |out|
|
9
9
|
out.yield(safe_filename("/etc/init/{{ name }}.conf"), render_template("init.conf"))
|
10
|
-
|
10
|
+
# Don't bother putting /etc/init.d/ shims anymore.
|
11
|
+
# The best way to interact with upstart is through initctl, start, stop,
|
12
|
+
# and restart commands
|
13
|
+
#out.yield(safe_filename("/etc/init.d/{{ name }}"), render_template("init.d.sh"), 0755)
|
11
14
|
end
|
12
15
|
end
|
13
16
|
end
|
data/pleaserun.gemspec
CHANGED
@@ -115,7 +115,16 @@ prestart() {
|
|
115
115
|
{{/prestart}}
|
116
116
|
|
117
117
|
case "$1" in
|
118
|
-
start)
|
118
|
+
start)
|
119
|
+
status
|
120
|
+
code=$?
|
121
|
+
if [ $code -eq 0 ]; then
|
122
|
+
echo "$name is already running"
|
123
|
+
else
|
124
|
+
start
|
125
|
+
fi
|
126
|
+
exit $code
|
127
|
+
;;
|
119
128
|
stop) stop ;;
|
120
129
|
force-stop) force_stop ;;
|
121
130
|
status)
|
data/test/helpers.rb
CHANGED
@@ -5,7 +5,16 @@ end
|
|
5
5
|
|
6
6
|
def test_in_container(tag, commands, outfile, errfile)
|
7
7
|
chdir = File.join(File.dirname(__FILE__), "vagrant")
|
8
|
-
|
8
|
+
|
9
|
+
# hacks for now because I don't know how to make vagrant smartly
|
10
|
+
# choose the right provider.
|
11
|
+
provider = case tag
|
12
|
+
when /^fedora-/, /^centos-/
|
13
|
+
"virtualbox"
|
14
|
+
else
|
15
|
+
"docker"
|
16
|
+
end
|
17
|
+
system("cd #{chdir}; vagrant up --provider=#{provider} #{tag} > #{outfile} 2> #{errfile}")
|
9
18
|
insist { $? }.success?
|
10
19
|
|
11
20
|
commands.each do |command|
|