Skip to content

Commit 7f9e05f

Browse files
committed
Adds custom files tab
1 parent f6694db commit 7f9e05f

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

src/Puphpet/MainBundle/Resources/views/front/sections/system.html.twig

+53
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,57 @@
1515
{{ extension.renderFront(extension.data)|raw }}
1616
</div>
1717
<div class="tab-pane" id="custom-files">
18+
<div class="section-header hidden">
19+
<h1>Custom Files</h1>
20+
<p class="lead">Information on dotfiles and custom executable bash files.</p>
21+
</div>
22+
23+
<div class="form-group">
24+
<fieldset>
25+
<legend>dotfiles</legend>
26+
27+
<div class="help-block">
28+
<p>You can add all your dot files (
29+
<code>.bash_aliases</code>, <code>.vimrc</code>,
30+
<code>.gitconfig</code>, etc),
31+
to the <code>puphpet/files/dot/</code> folder that will appear after
32+
you extract your generated zip file.</p>
33+
34+
<p>During initial startup, they will automatically be copied into the VM.
35+
There is a sample <code>.bash_aliases</code> file there for you to
36+
start with - overwrite at will!</p>
37+
</div>
38+
</fieldset>
39+
</div>
40+
41+
<div class="form-group">
42+
<fieldset>
43+
<legend>Custom Bash Files</legend>
44+
45+
<div class="help-block">
46+
<p>You can run your own custom code after the VM finishes provisioning by adding files to the
47+
<code>puphpet/files/exec-always</code>, <code>puphpet/files/exec-once</code>,
48+
<code>puphpet/files/startup-always</code>, and <code>puphpet/files/startup-once</code> folders.</p>
49+
50+
<p><strong>Files must end in <code>.sh</code></strong>. Valid:
51+
<code>foo.sh</code>; Invalid: <code>bar</code></p>
52+
53+
<p><strong>Files are executed in alphabetical order</strong>. Files within <code>exec-once</code>
54+
are run before files within <code>exec-always</code>, and files within <code>startup-once</code> are
55+
run before files within <code>startup-always</code>. Files in <code>exec-once</code> and
56+
<code>exec-always</code> are run before files in <code>startup-once</code>
57+
and <code>startup-always</code>.</p>
58+
59+
<p>Files within <code>exec-always</code> will run on initial <code>$ vagrant up</code> and all
60+
<code>$ vagrant provision</code>, while files within <code>exec-once</code> will
61+
run only the first time you run Vagrant, unless you SSH into the VM and remove the
62+
<code>/.puphpet-stuff/exec-once-ran</code> file and re-run Vagrant.</p>
63+
64+
<p>Files within <code>startup-always</code> will run on each <code>$ vagrant up</code>,
65+
while files within <code>startup-once</code> will only run on the next time you run Vagrant,
66+
unless you SSH into the VM and remove the <code>/.puphpet-stuff/startup-once-ran</code>
67+
file and re-run Vagrant.</p>
68+
</div>
69+
</fieldset>
70+
</div>
1871
</div>

src/Puphpet/MainBundle/Resources/views/front/side-menu.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<li><a href="#users-groups" data-toggle="tab"> User &amp; Groups </a></li>
3131
<li><a href="#firewall" data-toggle="tab"> Firewall Rules </a></li>
3232
<li><a href="#cron-jobs" data-toggle="tab"> Cron Jobs </a></li>
33-
<li><a href="#" data-toggle="tab"> Custom Files </a></li>
33+
<li><a href="#custom-files" data-toggle="tab"> Custom Files </a></li>
3434
</ul>
3535
</li>
3636

0 commit comments

Comments
 (0)