added syntax highlighting

This commit is contained in:
arcan1s
2014-01-17 23:11:53 +04:00
parent 4fd5d71767
commit 06b0518bb6
17 changed files with 542 additions and 645 deletions

View File

@ -13,7 +13,8 @@ links:
<!-- info block -->
<h2><a name="info" class="anchor" href="#info"><span class="octicon octicon-link"></span></a>Information</h2>
<p align="justify">Daemon for starting jobs to queue of calculations. It was written as proof-of-concept.</p>
<pre>$ queued --help
{% highlight bash %}
$ queued --help
Simple daemon written on BASH for starting jobs to queue of calculations
Usage: queued [ -c /etc/queued.conf ] [ -v | --version ] [ -h | --help ]
@ -21,15 +22,18 @@ Parametrs:
-c PATH - path to configuration file. Default is '/etc/queued.conf'
-v --version - show version and exit
-h --help - show this help and exit</pre>
<pre>$ add_queued --help
-h --help - show this help and exit
{% endhighlight %}
{% highlight bash %}
$ add_queued --help
add_queued [ -c /etc/queued.conf ] [ -p NUM ] [ -u USER ] [ -h | --help ] /path/to/script
Parameters:
-c PATH - path to configuration file. Default is '/etc/queued.conf'
-p NUM - job priority
-u USER - username
-h --help - show this help and exit</pre>
-h --help - show this help and exit
{% endhighlight %}
<h3><a name="devel" class="anchor" href="#devel"><span class="octicon octicon-link"></span></a>Developers and contributors</h3>
<ul>
@ -51,9 +55,13 @@ Parameters:
<ul>
<li><p align="justify">Download an <a href="https://github.com/arcan1s/queued/releases">archive</a> with latest version of source files.</p></li>
<li><p align="justify">Extract it and install the application:</p>
<pre>./install.sh "/path/to/root/"</pre>
{% highlight bash %}
./install.sh "/path/to/root/"
{% endhighlight %}
<p align="justify">If you want install it to <code>/</code> you must run it as root, e.g.:</p>
<pre>sudo ./install.sh</pre>
{% highlight bash %}
sudo ./install.sh
{% endhighlight %}
<p align="justify">If no path is specified it will be installed to <code>/</code> by default.</p></li>
</ul>
@ -68,17 +76,29 @@ Parameters:
<!-- howto block -->
<h2><a name="howto" class="anchor" href="#howto"><span class="octicon octicon-link"></span></a>How to use</h2>
<p align="justify">If you want to start the daemon just run</p>
<pre>systemctl start queued</pre>
{% highlight bash %}
systemctl start queued
{% endhighlight %}
<p align="justify">If you want to enable daemon autoload run</p>
<pre>systemctl enable queued</pre>
{% highlight bash %}
systemctl enable queued
{% endhighlight %}
<p align="justify">But you may change path to configuration file or change parameters. To do it just copy (recommended) the source configuration file to new path</p>
<pre>cp /etc/queued.conf /path/to/new/queued.conf</pre>
{% highlight bash %}
cp /etc/queued.conf /path/to/new/queued.conf
{% endhighlight %}
<p align="justify">and edit it. Then copy the source service file to <code>/etc</code>:</p>
<pre>cp /usr/lib/systemd/system/queued.service /etc/systemd/system/queued-my-profile.service</pre>
{% highlight bash %}
cp /usr/lib/systemd/system/queued.service /etc/systemd/system/queued-my-profile.service
{% endhighlight %}
<p align="justify">Replace following string in the file:</p>
<pre>ExecStart=/usr/bin/queued</pre>
{% highlight bash %}
ExecStart=/usr/bin/queued
{% endhighlight %}
<p align="justify">to</p>
<pre>ExecStart=/usr/bin/queued -c /path/to/new/queued.conf</pre>
{% highlight bash %}
ExecStart=/usr/bin/queued -c /path/to/new/queued.conf
{% endhighlight %}
<h3><a name="adding" class="anchor" href="#adding"><span class="octicon octicon-link"></span></a>Adding a job</h3>
<ol>
@ -91,7 +111,9 @@ Parameters:
<h2><a name="configuration" class="anchor" href="#configuration"><span class="octicon octicon-link"></span></a>Configuration</h2>
<p align="justify">All settings are stored in <code>/etc/queued.conf</code>. After edit them you must restart daemon</p>
<pre>systemctl restart queued</pre>
{% highlight bash %}
systemctl restart queued
{% endhighlight %}
<!-- end of howto block -->
<!-- config block -->