upstart-exporter 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardoc/checksums +6 -2
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/README.md +3 -1
- data/doc/Upstart/Exporter/Error.html +116 -0
- data/doc/Upstart/Exporter/Errors.html +189 -0
- data/doc/Upstart/Exporter/Options/CommandLine.html +373 -0
- data/doc/Upstart/Exporter/Options/Global.html +275 -0
- data/doc/Upstart/Exporter/Options.html +108 -0
- data/doc/Upstart/Exporter/Templates.html +303 -0
- data/doc/Upstart/Exporter.html +150 -1123
- data/doc/Upstart.html +3 -3
- data/doc/_index.html +70 -3
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +17 -15
- data/doc/index.html +17 -15
- data/doc/method_list.html +18 -82
- data/doc/top-level-namespace.html +1 -1
- data/lib/upstart-exporter/version.rb +1 -1
- metadata +9 -3
data/doc/Upstart.html
CHANGED
@@ -73,7 +73,7 @@
|
|
73
73
|
|
74
74
|
<dt class="r1 last">Defined in:</dt>
|
75
75
|
<dd class="r1 last">lib/upstart-exporter.rb<span class="defines">,<br />
|
76
|
-
lib/upstart-exporter/version.rb</span>
|
76
|
+
lib/upstart-exporter/version.rb,<br /> lib/upstart-exporter/templates.rb</span>
|
77
77
|
</dd>
|
78
78
|
|
79
79
|
</dl>
|
@@ -85,7 +85,7 @@
|
|
85
85
|
|
86
86
|
|
87
87
|
|
88
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Upstart/
|
88
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Upstart/Exporter.html" title="Upstart::Exporter (class)">Exporter</a></span>
|
89
89
|
|
90
90
|
|
91
91
|
</p>
|
@@ -99,7 +99,7 @@
|
|
99
99
|
</div>
|
100
100
|
|
101
101
|
<div id="footer">
|
102
|
-
Generated on Thu Dec
|
102
|
+
Generated on Thu Dec 22 20:43:32 2011 by
|
103
103
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
104
104
|
0.7.4 (ruby-1.8.7).
|
105
105
|
</div>
|
data/doc/_index.html
CHANGED
@@ -76,14 +76,36 @@
|
|
76
76
|
<td valign='top' width="33%">
|
77
77
|
|
78
78
|
|
79
|
+
<ul id="alpha_C" class="alpha">
|
80
|
+
<li class="letter">C</li>
|
81
|
+
<ul>
|
82
|
+
|
83
|
+
<li>
|
84
|
+
<span class='object_link'><a href="Upstart/Exporter/Options/CommandLine.html" title="Upstart::Exporter::Options::CommandLine (class)">CommandLine</a></span>
|
85
|
+
|
86
|
+
<small>(Upstart::Exporter::Options)</small>
|
87
|
+
|
88
|
+
</li>
|
89
|
+
|
90
|
+
</ul>
|
91
|
+
</ul>
|
92
|
+
|
93
|
+
|
79
94
|
<ul id="alpha_E" class="alpha">
|
80
95
|
<li class="letter">E</li>
|
81
96
|
<ul>
|
82
97
|
|
83
98
|
<li>
|
84
|
-
<span class='object_link'><a href="Upstart/
|
99
|
+
<span class='object_link'><a href="Upstart/Exporter/Error.html" title="Upstart::Exporter::Error (class)">Error</a></span>
|
85
100
|
|
86
|
-
<small>(Upstart)</small>
|
101
|
+
<small>(Upstart::Exporter)</small>
|
102
|
+
|
103
|
+
</li>
|
104
|
+
|
105
|
+
<li>
|
106
|
+
<span class='object_link'><a href="Upstart/Exporter/Errors.html" title="Upstart::Exporter::Errors (module)">Errors</a></span>
|
107
|
+
|
108
|
+
<small>(Upstart::Exporter)</small>
|
87
109
|
|
88
110
|
</li>
|
89
111
|
|
@@ -98,6 +120,51 @@
|
|
98
120
|
</ul>
|
99
121
|
|
100
122
|
|
123
|
+
<ul id="alpha_G" class="alpha">
|
124
|
+
<li class="letter">G</li>
|
125
|
+
<ul>
|
126
|
+
|
127
|
+
<li>
|
128
|
+
<span class='object_link'><a href="Upstart/Exporter/Options/Global.html" title="Upstart::Exporter::Options::Global (class)">Global</a></span>
|
129
|
+
|
130
|
+
<small>(Upstart::Exporter::Options)</small>
|
131
|
+
|
132
|
+
</li>
|
133
|
+
|
134
|
+
</ul>
|
135
|
+
</ul>
|
136
|
+
|
137
|
+
|
138
|
+
<ul id="alpha_O" class="alpha">
|
139
|
+
<li class="letter">O</li>
|
140
|
+
<ul>
|
141
|
+
|
142
|
+
<li>
|
143
|
+
<span class='object_link'><a href="Upstart/Exporter/Options.html" title="Upstart::Exporter::Options (module)">Options</a></span>
|
144
|
+
|
145
|
+
<small>(Upstart::Exporter)</small>
|
146
|
+
|
147
|
+
</li>
|
148
|
+
|
149
|
+
</ul>
|
150
|
+
</ul>
|
151
|
+
|
152
|
+
|
153
|
+
<ul id="alpha_T" class="alpha">
|
154
|
+
<li class="letter">T</li>
|
155
|
+
<ul>
|
156
|
+
|
157
|
+
<li>
|
158
|
+
<span class='object_link'><a href="Upstart/Exporter/Templates.html" title="Upstart::Exporter::Templates (class)">Templates</a></span>
|
159
|
+
|
160
|
+
<small>(Upstart::Exporter)</small>
|
161
|
+
|
162
|
+
</li>
|
163
|
+
|
164
|
+
</ul>
|
165
|
+
</ul>
|
166
|
+
|
167
|
+
|
101
168
|
<ul id="alpha_U" class="alpha">
|
102
169
|
<li class="letter">U</li>
|
103
170
|
<ul>
|
@@ -119,7 +186,7 @@
|
|
119
186
|
</div>
|
120
187
|
|
121
188
|
<div id="footer">
|
122
|
-
Generated on Thu Dec
|
189
|
+
Generated on Thu Dec 22 20:43:31 2011 by
|
123
190
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
124
191
|
0.7.4 (ruby-1.8.7).
|
125
192
|
</div>
|
data/doc/class_list.html
CHANGED
@@ -39,7 +39,7 @@
|
|
39
39
|
|
40
40
|
<ul id="full_list" class="class">
|
41
41
|
<li><span class='object_link'><a href="top-level-namespace.html" title=" (root)">Top Level Namespace</a></span></li>
|
42
|
-
<li><a class='toggle'></a> <span class='object_link'><a href="Upstart.html" title="Upstart (module)">Upstart</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="Upstart/
|
42
|
+
<li><a class='toggle'></a> <span class='object_link'><a href="Upstart.html" title="Upstart (module)">Upstart</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="Upstart/Exporter.html" title="Upstart::Exporter (class)">Exporter</a></span> < Object<small class='search_info'>Upstart</small></li><ul><li><span class='object_link'><a href="Upstart/Exporter/Error.html" title="Upstart::Exporter::Error (class)">Error</a></span> < RuntimeError<small class='search_info'>Upstart::Exporter</small></li><li><span class='object_link'><a href="Upstart/Exporter/Errors.html" title="Upstart::Exporter::Errors (module)">Errors</a></span><small class='search_info'>Upstart::Exporter</small></li><li><a class='toggle'></a> <span class='object_link'><a href="Upstart/Exporter/Options.html" title="Upstart::Exporter::Options (module)">Options</a></span><small class='search_info'>Upstart::Exporter</small></li><ul><li><span class='object_link'><a href="Upstart/Exporter/Options/CommandLine.html" title="Upstart::Exporter::Options::CommandLine (class)">CommandLine</a></span> < Hash<small class='search_info'>Upstart::Exporter::Options</small></li><li><span class='object_link'><a href="Upstart/Exporter/Options/Global.html" title="Upstart::Exporter::Options::Global (class)">Global</a></span> < Hash<small class='search_info'>Upstart::Exporter::Options</small></li></ul><li><span class='object_link'><a href="Upstart/Exporter/Templates.html" title="Upstart::Exporter::Templates (class)">Templates</a></span> < Object<small class='search_info'>Upstart::Exporter</small></li></ul></ul>
|
43
43
|
|
44
44
|
</ul>
|
45
45
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -58,11 +58,11 @@
|
|
58
58
|
|
59
59
|
<h2>Purpose</h2>
|
60
60
|
|
61
|
-
<p>It is often neccessary to run some supporting background tasks for rails projects alongside with the webserver. One of the solutions is use of Foreman gem, which allows to export tasks as Upstart scripts. This solution is dangerous,because it requires root priveleges for foreman executable (in order to add scripts to /etc/init), so it the
|
61
|
+
<p>It is often neccessary to run some supporting background tasks for rails projects alongside with the webserver. One of the solutions is use of Foreman gem, which allows to export tasks as Upstart scripts. This solution is dangerous, because it requires root priveleges for foreman executable (in order to add scripts to /etc/init), so it allows the exporting user to run any code as root (by placing appropriate script into /etc/init).</p>
|
62
62
|
|
63
|
-
<p>This gem is an attempt to provide a safe way for installing backround jobs, so that they run under some fixed user
|
63
|
+
<p>This gem is an attempt to provide a safe way for installing backround jobs, so that they run under some fixed user without root priveleges.</p>
|
64
64
|
|
65
|
-
<p>The only interface to the gem is the script it provides.</p>
|
65
|
+
<p>The only interface to the gem that should be used is the script(<em>upstart-export</em>) it provides.</p>
|
66
66
|
|
67
67
|
<h2>Installing</h2>
|
68
68
|
|
@@ -77,6 +77,7 @@
|
|
77
77
|
<span class='rubyid_run_user identifier id'>run_user</span><span class='colon op'>:</span> <span class='rubyid_www identifier id'>www</span> <span class='comment val'># The user under which all installed through upstart-exporter background jobs are run </span>
|
78
78
|
<span class='rubyid_helper_dir identifier id'>helper_dir</span><span class='colon op'>:</span> <span class='regexp val'>/var/</span><span class='rubyid_helper_dir identifier id'>helper_dir</span> <span class='comment val'># Auxilary directory for scripts incapsulating background jobs</span>
|
79
79
|
<span class='rubyid_upstart_dir identifier id'>upstart_dir</span><span class='colon op'>:</span> <span class='regexp val'>/var/</span><span class='rubyid_upstart_dir identifier id'>upstart_dir</span> <span class='comment val'># Directory where upstart scripts should be placed</span>
|
80
|
+
<span class='rubyid_prefix identifier id'>prefix</span><span class='colon op'>:</span> <span class='string val'>'myupstartjobs-'</span> <span class='comment val'># Prefix added to app's log folders and upstart scripts</span>
|
80
81
|
</pre>
|
81
82
|
|
82
83
|
<p>The config is not installed by default. If this config is absent, the default values are the following:</p>
|
@@ -84,9 +85,10 @@
|
|
84
85
|
<pre class="code"><span class='rubyid_helper_dir identifier id'>helper_dir</span><span class='colon op'>:</span> <span class='regexp val'>/var/</span><span class='rubyid_local identifier id'>local</span><span class='div op'>/</span><span class='rubyid_upstart_helpers identifier id'>upstart_helpers</span><span class='div op'>/</span>
|
85
86
|
<span class='rubyid_upstart_dir identifier id'>upstart_dir</span><span class='colon op'>:</span> <span class='regexp val'>/etc/i</span><span class='rubyid_nit identifier id'>nit</span><span class='div op'>/</span>
|
86
87
|
<span class='rubyid_run_user identifier id'>run_user</span><span class='colon op'>:</span> <span class='rubyid_service identifier id'>service</span>
|
88
|
+
<span class='rubyid_prefix identifier id'>prefix</span><span class='colon op'>:</span> <span class='string val'>'fb-'</span>
|
87
89
|
</pre>
|
88
90
|
|
89
|
-
<p>To give a user (i.e. deployuser) ability to use this script, one can place
|
91
|
+
<p>To give a certain user (i.e. deployuser) ability to use this script, one can place the following lines into sudoers file:</p>
|
90
92
|
|
91
93
|
<pre class="code"><span class='comment val'># Commands required for manipulating jobs</span>
|
92
94
|
<span class='rubyid_Cmnd_Alias constant id'>Cmnd_Alias</span> <span class='rubyid_UPSTART constant id'>UPSTART</span> <span class='assign token'>=</span> <span class='regexp val'>/sbin/s</span><span class='rubyid_tart identifier id'>tart</span><span class='comma token'>,</span> <span class='regexp val'>/sbin/s</span><span class='rubyid_top identifier id'>top</span><span class='comma token'>,</span> <span class='regexp val'>/sbin/</span><span class='rubyid_restart identifier id'>restart</span>
|
@@ -124,22 +126,22 @@
|
|
124
126
|
<pre class="code"><span class='rubyid_sudo identifier id'>sudo</span> <span class='rubyid_upstart identifier id'>upstart</span><span class='minus op'>-</span><span class='rubyid_export identifier id'>export</span> <span class='minus op'>-</span><span class='rubyid_p identifier id'>p</span> <span class='dot token'>.</span><span class='div op'>/</span><span class='rubyid_myprocfile identifier id'>myprocfile</span> <span class='minus op'>-</span><span class='rubyid_n identifier id'>n</span> <span class='rubyid_myapp identifier id'>myapp</span>
|
125
127
|
</pre>
|
126
128
|
|
127
|
-
<p
|
129
|
+
<p>where <em>myapp</em> is the application name. This name only affects the names of generated files. For security purposes, app name is also allowed to contain only letters, digits and underscores. Assuming that default options are used, the following files and folders will be generated:</p>
|
128
130
|
|
129
|
-
<p>in /etc/init
|
130
|
-
fb-myapp-my<em>another</em>tail<em>cmd-real.conf
|
131
|
-
fb-myapp-my</em>another<em>tail</em>cmd.conf
|
132
|
-
fb-myapp-my<em>tail</em>cmd-real.conf
|
133
|
-
fb-myapp-my<em>tail</em>cmd.conf
|
134
|
-
fb-myapp.conf</p>
|
131
|
+
<p>in /etc/init/:</p>
|
135
132
|
|
136
|
-
<
|
133
|
+
<pre class="code"><span class='rubyid_fb identifier id'>fb</span><span class='minus op'>-</span><span class='rubyid_myapp identifier id'>myapp</span><span class='minus op'>-</span><span class='rubyid_my_another_tail_cmd identifier id'>my_another_tail_cmd</span><span class='dot token'>.</span><span class='rubyid_conf identifier id'>conf</span>
|
134
|
+
<span class='rubyid_fb identifier id'>fb</span><span class='minus op'>-</span><span class='rubyid_myapp identifier id'>myapp</span><span class='minus op'>-</span><span class='rubyid_my_tail_cmd identifier id'>my_tail_cmd</span><span class='dot token'>.</span><span class='rubyid_conf identifier id'>conf</span>
|
135
|
+
<span class='rubyid_fb identifier id'>fb</span><span class='minus op'>-</span><span class='rubyid_myapp identifier id'>myapp</span><span class='dot token'>.</span><span class='rubyid_conf identifier id'>conf</span>
|
136
|
+
</pre>
|
137
|
+
|
138
|
+
<p>in /var/local/upstart_helpers/:</p>
|
137
139
|
|
138
140
|
<pre class="code"><span class='rubyid_fb identifier id'>fb</span><span class='minus op'>-</span><span class='rubyid_myapp identifier id'>myapp</span><span class='minus op'>-</span><span class='rubyid_my_another_tail_cmd identifier id'>my_another_tail_cmd</span><span class='dot token'>.</span><span class='rubyid_sh identifier id'>sh</span>
|
139
141
|
<span class='rubyid_fb identifier id'>fb</span><span class='minus op'>-</span><span class='rubyid_myapp identifier id'>myapp</span><span class='minus op'>-</span><span class='rubyid_my_tail_cmd identifier id'>my_tail_cmd</span><span class='dot token'>.</span><span class='rubyid_sh identifier id'>sh</span>
|
140
142
|
</pre>
|
141
143
|
|
142
|
-
<p>Prefix fb
|
144
|
+
<p>Prefix 'fb-' (which can be customised through config) is added to avoid collisions with other upstart jobs. After this my_tail_cmd, for example, will be able to be started as an upstart script:</p>
|
143
145
|
|
144
146
|
<pre class="code"><span class='rubyid_sudo identifier id'>sudo</span> <span class='rubyid_start identifier id'>start</span> <span class='rubyid_fb identifier id'>fb</span><span class='minus op'>-</span><span class='rubyid_myapp identifier id'>myapp</span><span class='minus op'>-</span><span class='rubyid_my_tail_cmd identifier id'>my_tail_cmd</span>
|
145
147
|
|
@@ -162,11 +164,11 @@
|
|
162
164
|
<pre class="code"><span class='rubyid_sudo identifier id'>sudo</span> <span class='rubyid_upstart identifier id'>upstart</span><span class='minus op'>-</span><span class='rubyid_export identifier id'>export</span> <span class='minus op'>-</span><span class='rubyid_c identifier id'>c</span> <span class='minus op'>-</span><span class='rubyid_n identifier id'>n</span> <span class='rubyid_myapp identifier id'>myapp</span>
|
163
165
|
</pre>
|
164
166
|
|
165
|
-
<p>The logs
|
167
|
+
<p>The logs are not cleared in this case. Also, all old application scripts are cleared before each export.</p>
|
166
168
|
</div></div>
|
167
169
|
|
168
170
|
<div id="footer">
|
169
|
-
Generated on Thu Dec
|
171
|
+
Generated on Thu Dec 22 20:43:31 2011 by
|
170
172
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
171
173
|
0.7.4 (ruby-1.8.7).
|
172
174
|
</div>
|
data/doc/index.html
CHANGED
@@ -58,11 +58,11 @@
|
|
58
58
|
|
59
59
|
<h2>Purpose</h2>
|
60
60
|
|
61
|
-
<p>It is often neccessary to run some supporting background tasks for rails projects alongside with the webserver. One of the solutions is use of Foreman gem, which allows to export tasks as Upstart scripts. This solution is dangerous,because it requires root priveleges for foreman executable (in order to add scripts to /etc/init), so it the
|
61
|
+
<p>It is often neccessary to run some supporting background tasks for rails projects alongside with the webserver. One of the solutions is use of Foreman gem, which allows to export tasks as Upstart scripts. This solution is dangerous, because it requires root priveleges for foreman executable (in order to add scripts to /etc/init), so it allows the exporting user to run any code as root (by placing appropriate script into /etc/init).</p>
|
62
62
|
|
63
|
-
<p>This gem is an attempt to provide a safe way for installing backround jobs, so that they run under some fixed user
|
63
|
+
<p>This gem is an attempt to provide a safe way for installing backround jobs, so that they run under some fixed user without root priveleges.</p>
|
64
64
|
|
65
|
-
<p>The only interface to the gem is the script it provides.</p>
|
65
|
+
<p>The only interface to the gem that should be used is the script(<em>upstart-export</em>) it provides.</p>
|
66
66
|
|
67
67
|
<h2>Installing</h2>
|
68
68
|
|
@@ -77,6 +77,7 @@
|
|
77
77
|
<span class='rubyid_run_user identifier id'>run_user</span><span class='colon op'>:</span> <span class='rubyid_www identifier id'>www</span> <span class='comment val'># The user under which all installed through upstart-exporter background jobs are run </span>
|
78
78
|
<span class='rubyid_helper_dir identifier id'>helper_dir</span><span class='colon op'>:</span> <span class='regexp val'>/var/</span><span class='rubyid_helper_dir identifier id'>helper_dir</span> <span class='comment val'># Auxilary directory for scripts incapsulating background jobs</span>
|
79
79
|
<span class='rubyid_upstart_dir identifier id'>upstart_dir</span><span class='colon op'>:</span> <span class='regexp val'>/var/</span><span class='rubyid_upstart_dir identifier id'>upstart_dir</span> <span class='comment val'># Directory where upstart scripts should be placed</span>
|
80
|
+
<span class='rubyid_prefix identifier id'>prefix</span><span class='colon op'>:</span> <span class='string val'>'myupstartjobs-'</span> <span class='comment val'># Prefix added to app's log folders and upstart scripts</span>
|
80
81
|
</pre>
|
81
82
|
|
82
83
|
<p>The config is not installed by default. If this config is absent, the default values are the following:</p>
|
@@ -84,9 +85,10 @@
|
|
84
85
|
<pre class="code"><span class='rubyid_helper_dir identifier id'>helper_dir</span><span class='colon op'>:</span> <span class='regexp val'>/var/</span><span class='rubyid_local identifier id'>local</span><span class='div op'>/</span><span class='rubyid_upstart_helpers identifier id'>upstart_helpers</span><span class='div op'>/</span>
|
85
86
|
<span class='rubyid_upstart_dir identifier id'>upstart_dir</span><span class='colon op'>:</span> <span class='regexp val'>/etc/i</span><span class='rubyid_nit identifier id'>nit</span><span class='div op'>/</span>
|
86
87
|
<span class='rubyid_run_user identifier id'>run_user</span><span class='colon op'>:</span> <span class='rubyid_service identifier id'>service</span>
|
88
|
+
<span class='rubyid_prefix identifier id'>prefix</span><span class='colon op'>:</span> <span class='string val'>'fb-'</span>
|
87
89
|
</pre>
|
88
90
|
|
89
|
-
<p>To give a user (i.e. deployuser) ability to use this script, one can place
|
91
|
+
<p>To give a certain user (i.e. deployuser) ability to use this script, one can place the following lines into sudoers file:</p>
|
90
92
|
|
91
93
|
<pre class="code"><span class='comment val'># Commands required for manipulating jobs</span>
|
92
94
|
<span class='rubyid_Cmnd_Alias constant id'>Cmnd_Alias</span> <span class='rubyid_UPSTART constant id'>UPSTART</span> <span class='assign token'>=</span> <span class='regexp val'>/sbin/s</span><span class='rubyid_tart identifier id'>tart</span><span class='comma token'>,</span> <span class='regexp val'>/sbin/s</span><span class='rubyid_top identifier id'>top</span><span class='comma token'>,</span> <span class='regexp val'>/sbin/</span><span class='rubyid_restart identifier id'>restart</span>
|
@@ -124,22 +126,22 @@
|
|
124
126
|
<pre class="code"><span class='rubyid_sudo identifier id'>sudo</span> <span class='rubyid_upstart identifier id'>upstart</span><span class='minus op'>-</span><span class='rubyid_export identifier id'>export</span> <span class='minus op'>-</span><span class='rubyid_p identifier id'>p</span> <span class='dot token'>.</span><span class='div op'>/</span><span class='rubyid_myprocfile identifier id'>myprocfile</span> <span class='minus op'>-</span><span class='rubyid_n identifier id'>n</span> <span class='rubyid_myapp identifier id'>myapp</span>
|
125
127
|
</pre>
|
126
128
|
|
127
|
-
<p
|
129
|
+
<p>where <em>myapp</em> is the application name. This name only affects the names of generated files. For security purposes, app name is also allowed to contain only letters, digits and underscores. Assuming that default options are used, the following files and folders will be generated:</p>
|
128
130
|
|
129
|
-
<p>in /etc/init
|
130
|
-
fb-myapp-my<em>another</em>tail<em>cmd-real.conf
|
131
|
-
fb-myapp-my</em>another<em>tail</em>cmd.conf
|
132
|
-
fb-myapp-my<em>tail</em>cmd-real.conf
|
133
|
-
fb-myapp-my<em>tail</em>cmd.conf
|
134
|
-
fb-myapp.conf</p>
|
131
|
+
<p>in /etc/init/:</p>
|
135
132
|
|
136
|
-
<
|
133
|
+
<pre class="code"><span class='rubyid_fb identifier id'>fb</span><span class='minus op'>-</span><span class='rubyid_myapp identifier id'>myapp</span><span class='minus op'>-</span><span class='rubyid_my_another_tail_cmd identifier id'>my_another_tail_cmd</span><span class='dot token'>.</span><span class='rubyid_conf identifier id'>conf</span>
|
134
|
+
<span class='rubyid_fb identifier id'>fb</span><span class='minus op'>-</span><span class='rubyid_myapp identifier id'>myapp</span><span class='minus op'>-</span><span class='rubyid_my_tail_cmd identifier id'>my_tail_cmd</span><span class='dot token'>.</span><span class='rubyid_conf identifier id'>conf</span>
|
135
|
+
<span class='rubyid_fb identifier id'>fb</span><span class='minus op'>-</span><span class='rubyid_myapp identifier id'>myapp</span><span class='dot token'>.</span><span class='rubyid_conf identifier id'>conf</span>
|
136
|
+
</pre>
|
137
|
+
|
138
|
+
<p>in /var/local/upstart_helpers/:</p>
|
137
139
|
|
138
140
|
<pre class="code"><span class='rubyid_fb identifier id'>fb</span><span class='minus op'>-</span><span class='rubyid_myapp identifier id'>myapp</span><span class='minus op'>-</span><span class='rubyid_my_another_tail_cmd identifier id'>my_another_tail_cmd</span><span class='dot token'>.</span><span class='rubyid_sh identifier id'>sh</span>
|
139
141
|
<span class='rubyid_fb identifier id'>fb</span><span class='minus op'>-</span><span class='rubyid_myapp identifier id'>myapp</span><span class='minus op'>-</span><span class='rubyid_my_tail_cmd identifier id'>my_tail_cmd</span><span class='dot token'>.</span><span class='rubyid_sh identifier id'>sh</span>
|
140
142
|
</pre>
|
141
143
|
|
142
|
-
<p>Prefix fb
|
144
|
+
<p>Prefix 'fb-' (which can be customised through config) is added to avoid collisions with other upstart jobs. After this my_tail_cmd, for example, will be able to be started as an upstart script:</p>
|
143
145
|
|
144
146
|
<pre class="code"><span class='rubyid_sudo identifier id'>sudo</span> <span class='rubyid_start identifier id'>start</span> <span class='rubyid_fb identifier id'>fb</span><span class='minus op'>-</span><span class='rubyid_myapp identifier id'>myapp</span><span class='minus op'>-</span><span class='rubyid_my_tail_cmd identifier id'>my_tail_cmd</span>
|
145
147
|
|
@@ -162,11 +164,11 @@
|
|
162
164
|
<pre class="code"><span class='rubyid_sudo identifier id'>sudo</span> <span class='rubyid_upstart identifier id'>upstart</span><span class='minus op'>-</span><span class='rubyid_export identifier id'>export</span> <span class='minus op'>-</span><span class='rubyid_c identifier id'>c</span> <span class='minus op'>-</span><span class='rubyid_n identifier id'>n</span> <span class='rubyid_myapp identifier id'>myapp</span>
|
163
165
|
</pre>
|
164
166
|
|
165
|
-
<p>The logs
|
167
|
+
<p>The logs are not cleared in this case. Also, all old application scripts are cleared before each export.</p>
|
166
168
|
</div></div>
|
167
169
|
|
168
170
|
<div id="footer">
|
169
|
-
Generated on Thu Dec
|
171
|
+
Generated on Thu Dec 22 20:43:31 2011 by
|
170
172
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
171
173
|
0.7.4 (ruby-1.8.7).
|
172
174
|
</div>
|
data/doc/method_list.html
CHANGED
@@ -41,22 +41,14 @@
|
|
41
41
|
|
42
42
|
|
43
43
|
<li class="r1 ">
|
44
|
-
<span class='object_link'><a href="Upstart/Exporter.html#
|
44
|
+
<span class='object_link'><a href="Upstart/Exporter/Templates.html#app-class_method" title="Upstart::Exporter::Templates.app (method)">app</a></span>
|
45
45
|
|
46
|
-
<small>Upstart::Exporter</small>
|
46
|
+
<small>Upstart::Exporter::Templates</small>
|
47
47
|
|
48
48
|
</li>
|
49
49
|
|
50
50
|
|
51
51
|
<li class="r2 ">
|
52
|
-
<span class='object_link'><a href="Upstart/Exporter.html#check_dir-instance_method" title="Upstart::Exporter#check_dir (method)">#check_dir</a></span>
|
53
|
-
|
54
|
-
<small>Upstart::Exporter</small>
|
55
|
-
|
56
|
-
</li>
|
57
|
-
|
58
|
-
|
59
|
-
<li class="r1 ">
|
60
52
|
<span class='object_link'><a href="Upstart/Exporter.html#clear-instance_method" title="Upstart::Exporter#clear (method)">#clear</a></span>
|
61
53
|
|
62
54
|
<small>Upstart::Exporter</small>
|
@@ -64,32 +56,24 @@
|
|
64
56
|
</li>
|
65
57
|
|
66
58
|
|
67
|
-
<li class="r2 ">
|
68
|
-
<span class='object_link'><a href="Upstart/Exporter.html#error-instance_method" title="Upstart::Exporter#error (method)">#error</a></span>
|
69
|
-
|
70
|
-
<small>Upstart::Exporter</small>
|
71
|
-
|
72
|
-
</li>
|
73
|
-
|
74
|
-
|
75
59
|
<li class="r1 ">
|
76
|
-
<span class='object_link'><a href="Upstart/Exporter.html#
|
60
|
+
<span class='object_link'><a href="Upstart/Exporter/Templates.html#command-class_method" title="Upstart::Exporter::Templates.command (method)">command</a></span>
|
77
61
|
|
78
|
-
<small>Upstart::Exporter</small>
|
62
|
+
<small>Upstart::Exporter::Templates</small>
|
79
63
|
|
80
64
|
</li>
|
81
65
|
|
82
66
|
|
83
67
|
<li class="r2 ">
|
84
|
-
<span class='object_link'><a href="Upstart/Exporter.html#
|
68
|
+
<span class='object_link'><a href="Upstart/Exporter/Errors.html#error-instance_method" title="Upstart::Exporter::Errors#error (method)">#error</a></span>
|
85
69
|
|
86
|
-
<small>Upstart::Exporter</small>
|
70
|
+
<small>Upstart::Exporter::Errors</small>
|
87
71
|
|
88
72
|
</li>
|
89
73
|
|
90
74
|
|
91
75
|
<li class="r1 ">
|
92
|
-
<span class='object_link'><a href="Upstart/Exporter.html#
|
76
|
+
<span class='object_link'><a href="Upstart/Exporter.html#export-instance_method" title="Upstart::Exporter#export (method)">#export</a></span>
|
93
77
|
|
94
78
|
<small>Upstart::Exporter</small>
|
95
79
|
|
@@ -97,38 +81,30 @@
|
|
97
81
|
|
98
82
|
|
99
83
|
<li class="r2 ">
|
100
|
-
<span class='object_link'><a href="Upstart/Exporter.html#
|
84
|
+
<span class='object_link'><a href="Upstart/Exporter/Templates.html#helper-class_method" title="Upstart::Exporter::Templates.helper (method)">helper</a></span>
|
101
85
|
|
102
|
-
<small>Upstart::Exporter</small>
|
86
|
+
<small>Upstart::Exporter::Templates</small>
|
103
87
|
|
104
88
|
</li>
|
105
89
|
|
106
90
|
|
107
91
|
<li class="r1 ">
|
108
|
-
<span class='object_link'><a href="Upstart/Exporter.html#
|
92
|
+
<span class='object_link'><a href="Upstart/Exporter/Options/Global.html#initialize-instance_method" title="Upstart::Exporter::Options::Global#initialize (method)">#initialize</a></span>
|
109
93
|
|
110
|
-
<small>Upstart::Exporter</small>
|
94
|
+
<small>Upstart::Exporter::Options::Global</small>
|
111
95
|
|
112
96
|
</li>
|
113
97
|
|
114
98
|
|
115
99
|
<li class="r2 ">
|
116
|
-
<span class='object_link'><a href="Upstart/Exporter.html#
|
100
|
+
<span class='object_link'><a href="Upstart/Exporter/Options/CommandLine.html#initialize-instance_method" title="Upstart::Exporter::Options::CommandLine#initialize (method)">#initialize</a></span>
|
117
101
|
|
118
|
-
<small>Upstart::Exporter</small>
|
102
|
+
<small>Upstart::Exporter::Options::CommandLine</small>
|
119
103
|
|
120
104
|
</li>
|
121
105
|
|
122
106
|
|
123
107
|
<li class="r1 ">
|
124
|
-
<span class='object_link'><a href="Upstart/Exporter.html#helper_dir-instance_method" title="Upstart::Exporter#helper_dir (method)">#helper_dir</a></span>
|
125
|
-
|
126
|
-
<small>Upstart::Exporter</small>
|
127
|
-
|
128
|
-
</li>
|
129
|
-
|
130
|
-
|
131
|
-
<li class="r2 ">
|
132
108
|
<span class='object_link'><a href="Upstart/Exporter.html#initialize-instance_method" title="Upstart::Exporter#initialize (method)">#initialize</a></span>
|
133
109
|
|
134
110
|
<small>Upstart::Exporter</small>
|
@@ -136,16 +112,8 @@
|
|
136
112
|
</li>
|
137
113
|
|
138
114
|
|
139
|
-
<li class="r1 ">
|
140
|
-
<span class='object_link'><a href="Upstart/Exporter.html#process_appname-instance_method" title="Upstart::Exporter#process_appname (method)">#process_appname</a></span>
|
141
|
-
|
142
|
-
<small>Upstart::Exporter</small>
|
143
|
-
|
144
|
-
</li>
|
145
|
-
|
146
|
-
|
147
115
|
<li class="r2 ">
|
148
|
-
<span class='object_link'><a href="Upstart/Exporter.html#
|
116
|
+
<span class='object_link'><a href="Upstart/Exporter.html#options-instance_method" title="Upstart::Exporter#options (method)">#options</a></span>
|
149
117
|
|
150
118
|
<small>Upstart::Exporter</small>
|
151
119
|
|
@@ -153,49 +121,17 @@
|
|
153
121
|
|
154
122
|
|
155
123
|
<li class="r1 ">
|
156
|
-
<span class='object_link'><a href="Upstart/Exporter.html#
|
124
|
+
<span class='object_link'><a href="Upstart/Exporter/Options/CommandLine.html#process_appname-instance_method" title="Upstart::Exporter::Options::CommandLine#process_appname (method)">#process_appname</a></span>
|
157
125
|
|
158
|
-
<small>Upstart::Exporter</small>
|
126
|
+
<small>Upstart::Exporter::Options::CommandLine</small>
|
159
127
|
|
160
128
|
</li>
|
161
129
|
|
162
130
|
|
163
131
|
<li class="r2 ">
|
164
|
-
<span class='object_link'><a href="Upstart/Exporter.html#
|
132
|
+
<span class='object_link'><a href="Upstart/Exporter/Options/CommandLine.html#process_procfile-instance_method" title="Upstart::Exporter::Options::CommandLine#process_procfile (method)">#process_procfile</a></span>
|
165
133
|
|
166
|
-
<small>Upstart::Exporter</small>
|
167
|
-
|
168
|
-
</li>
|
169
|
-
|
170
|
-
|
171
|
-
<li class="r1 ">
|
172
|
-
<span class='object_link'><a href="Upstart/Exporter.html#run_user-instance_method" title="Upstart::Exporter#run_user (method)">#run_user</a></span>
|
173
|
-
|
174
|
-
<small>Upstart::Exporter</small>
|
175
|
-
|
176
|
-
</li>
|
177
|
-
|
178
|
-
|
179
|
-
<li class="r2 ">
|
180
|
-
<span class='object_link'><a href="Upstart/Exporter.html#upstart_cmd_conf-instance_method" title="Upstart::Exporter#upstart_cmd_conf (method)">#upstart_cmd_conf</a></span>
|
181
|
-
|
182
|
-
<small>Upstart::Exporter</small>
|
183
|
-
|
184
|
-
</li>
|
185
|
-
|
186
|
-
|
187
|
-
<li class="r1 ">
|
188
|
-
<span class='object_link'><a href="Upstart/Exporter.html#upstart_conf-instance_method" title="Upstart::Exporter#upstart_conf (method)">#upstart_conf</a></span>
|
189
|
-
|
190
|
-
<small>Upstart::Exporter</small>
|
191
|
-
|
192
|
-
</li>
|
193
|
-
|
194
|
-
|
195
|
-
<li class="r2 ">
|
196
|
-
<span class='object_link'><a href="Upstart/Exporter.html#upstart_dir-instance_method" title="Upstart::Exporter#upstart_dir (method)">#upstart_dir</a></span>
|
197
|
-
|
198
|
-
<small>Upstart::Exporter</small>
|
134
|
+
<small>Upstart::Exporter::Options::CommandLine</small>
|
199
135
|
|
200
136
|
</li>
|
201
137
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: upstart-exporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ilya Averyanov
|
@@ -41,6 +41,12 @@ files:
|
|
41
41
|
- doc/Upstart.html
|
42
42
|
- doc/Upstart/ExportError.html
|
43
43
|
- doc/Upstart/Exporter.html
|
44
|
+
- doc/Upstart/Exporter/Error.html
|
45
|
+
- doc/Upstart/Exporter/Errors.html
|
46
|
+
- doc/Upstart/Exporter/Options.html
|
47
|
+
- doc/Upstart/Exporter/Options/CommandLine.html
|
48
|
+
- doc/Upstart/Exporter/Options/Global.html
|
49
|
+
- doc/Upstart/Exporter/Templates.html
|
44
50
|
- doc/_index.html
|
45
51
|
- doc/class_list.html
|
46
52
|
- doc/css/common.css
|