Document logging interface

This commit is contained in:
Bob Mottram 2017-07-01 20:24:04 +01:00
parent 21822c6e75
commit b42080788a
2 changed files with 45 additions and 24 deletions

View File

@ -89,6 +89,16 @@ myappname_variables=(ONION_ONLY
MYAPPNAME_ONION_PORT
MYAPPNAME_DB_PASSWORD)
function logging_on_xmpp {
echo -n ''
# Commands to turn on logging go here
}
function logging_off_xmpp {
echo -n ''
# Commands to turn off logging go here
}
function change_password_myappname {
PASSWORD_USERNAME="$1"
PASSWORD_NEW="$2"

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2016-11-23 Wed 23:19 -->
<!-- 2017-07-01 Sat 20:23 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title></title>
@ -71,6 +71,7 @@
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
@ -188,7 +189,7 @@
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2013 Free Software Foundation, Inc.
Copyright (C) 2012-2017 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
@ -245,17 +246,17 @@ for the JavaScript code in this tag.
<center><h1>Developers Guide</h1></center>
<div id="outline-container-org1fc2c1f" class="outline-2">
<h2 id="org1fc2c1f">Introduction</h2>
<div class="outline-text-2" id="text-org1fc2c1f">
<div id="outline-container-orge96e638" class="outline-2">
<h2 id="orge96e638">Introduction</h2>
<div class="outline-text-2" id="text-orge96e638">
<p>
Freedombone consists of a set of bash scripts. There are a lot of them, but they're not very complicated. If you're familiar with the GNU/Linux commandline and can hack a bash script then you can probably add a new app or fix a bug in the system. There are no trendy development frameworks to learn or to get in your way.
</p>
</div>
</div>
<div id="outline-container-org3f49a43" class="outline-2">
<h2 id="org3f49a43">Community Statement</h2>
<div class="outline-text-2" id="text-org3f49a43">
<div id="outline-container-orgc332597" class="outline-2">
<h2 id="orgc332597">Community Statement</h2>
<div class="outline-text-2" id="text-orgc332597">
<p>
This project doesn't require you to take any special pledge of allegiance or subscribe to any guru's list of commandments. It does not care about your gender, race, national flag or political alignment. It is agnostic towards your religion or lack thereof. It doesn't give one hoot as to whether you are young or old, rich or poor, gay, trans, straight or just "other". It does not care if you like your eggs sunny side up or if you are a vegan.
</p>
@ -273,9 +274,9 @@ This project also has a no bullshit policy. Anyone trying to cause a ruckus by t
</p>
</div>
</div>
<div id="outline-container-orgd57ea28" class="outline-2">
<h2 id="orgd57ea28">Adding extra apps</h2>
<div class="outline-text-2" id="text-orgd57ea28">
<div id="outline-container-org97b40ca" class="outline-2">
<h2 id="org97b40ca">Adding extra apps</h2>
<div class="outline-text-2" id="text-org97b40ca">
<p>
Suppose you have some internet application which you want to add to the system. To do this you need to create an app script which tells the system how to install/remove and also backup/restore. The script should be designed to work with the current stable version of Debian.
</p>
@ -285,8 +286,8 @@ On an installed system the app scripts go into the directory:
</p>
<div class="org-src-container">
<pre class="src src-bash">/usr/share/freedombone/apps
</pre>
<pre><code class="src src-bash">/usr/share/freedombone/apps
</code></pre>
</div>
<p>
@ -294,8 +295,8 @@ and within the project repo they appear within the <i>src</i> directory. Your ne
</p>
<div class="org-src-container">
<pre class="src src-bash">freedombone-app-[myappname]
</pre>
<pre><code class="src src-bash">freedombone-app-[myappname]
</code></pre>
</div>
<p>
@ -307,7 +308,7 @@ An example template for an app script is shown below. Copy this and add whatever
</p>
<div class="org-src-container">
<pre class="src src-bash"><span class="org-comment-delimiter">#</span><span class="org-comment">!/bin/</span><span class="org-keyword">bash</span>
<pre><code class="src src-bash"><span class="org-comment-delimiter">#</span><span class="org-comment">!/bin/</span><span class="org-keyword">bash</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">Copyright (C) Year YourName &lt;YourEmail&gt;</span>
<span class="org-comment-delimiter">#</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">This program is free software: you can redistribute it</span>
@ -352,6 +353,16 @@ An example template for an app script is shown below. Copy this and add whatever
MYAPPNAME_ONION_PORT
MYAPPNAME_DB_PASSWORD)
<span class="org-keyword">function</span> <span class="org-function-name">logging_on_xmpp</span> {
<span class="org-builtin">echo</span> -n <span class="org-string">''</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">Commands to turn on logging go here</span>
}
<span class="org-keyword">function</span> <span class="org-function-name">logging_off_xmpp</span> {
<span class="org-builtin">echo</span> -n <span class="org-string">''</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">Commands to turn off logging go here</span>
}
<span class="org-keyword">function</span> <span class="org-function-name">change_password_myappname</span> {
<span class="org-variable-name">PASSWORD_USERNAME</span>=<span class="org-string">"$1"</span>
<span class="org-variable-name">PASSWORD_NEW</span>=<span class="org-string">"$2"</span>
@ -508,7 +519,7 @@ An example template for an app script is shown below. Copy this and add whatever
}
<span class="org-comment-delimiter"># </span><span class="org-comment">NOTE: deliberately no exit 0</span>
</pre>
</code></pre>
</div>
<p>
@ -516,8 +527,8 @@ To test your app log into your system, select <b>Exit to command line</b> then g
</p>
<div class="org-src-container">
<pre class="src src-bash">sudo su
</pre>
<pre><code class="src src-bash">sudo su
</code></pre>
</div>
<p>
@ -529,8 +540,8 @@ And run the admin control panel:
</p>
<div class="org-src-container">
<pre class="src src-bash">control
</pre>
<pre><code class="src src-bash">control
</code></pre>
</div>
<p>
@ -543,9 +554,9 @@ Submit your working app to <b><a href="https://github.com/bashrc/freedombone/iss
</div>
</div>
<div id="outline-container-orgf5d4a43" class="outline-2">
<h2 id="orgf5d4a43">Customising mesh images</h2>
<div class="outline-text-2" id="text-orgf5d4a43">
<div id="outline-container-org285c2d1" class="outline-2">
<h2 id="org285c2d1">Customising mesh images</h2>
<div class="outline-text-2" id="text-org285c2d1">
<p>
If you want to make your own specially branded version of the mesh images, such as for a particular event, then to change the default desktop backgrounds edit the images within <b>img/backgrounds</b> and to change the available avatars and desktop icons edit the images within <b>img/avatars</b>. Re-create disk images using the instructions shown previously.
</p>