From 5f756a4aa6074530d7acdc2a046009b617313266 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 19 Oct 2016 21:29:15 +0100 Subject: [PATCH] About variable --- doc/EN/devguide.org | 3 + website/EN/devguide.html | 5552 +++++++++++++++++++++++++++++++++++++- 2 files changed, 5510 insertions(+), 45 deletions(-) diff --git a/doc/EN/devguide.org b/doc/EN/devguide.org index 45f15241..70f3ad3a 100644 --- a/doc/EN/devguide.org +++ b/doc/EN/devguide.org @@ -68,6 +68,9 @@ An example template for an app script is shown below. Copy this and add whatever # app scripts. VARIANTS='full' +# If you want this to appear on the control panel About screen +SHOW_ON_ABOUT=1 + SOME_IMPORTANT_CONFIG_VARIABLE='some important value' ANOTHER_IMPORTANT_CONFIG_VARIABLE='foo' MY_FUNKY_AVATAR=https://some-domain-or-other/fro.png diff --git a/website/EN/devguide.html b/website/EN/devguide.html index 4613a3c4..0faaf85e 100644 --- a/website/EN/devguide.html +++ b/website/EN/devguide.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -245,17 +245,17 @@ for the JavaScript code in this tag.

Developers Guide

-
-

Introduction

-
+
+

Introduction

+

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.

-
-

Community Statement

-
+
+

Community Statement

+

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 or straight. It does not care if you like your eggs sunny side up or if you are a vegan.

@@ -273,9 +273,9 @@ This project also has a no bullshit policy. Anyone trying to cause a ruckus by t

-
-

Adding extra apps

-
+
+

Adding extra apps

+

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.

@@ -323,25 +323,28 @@ An example template for an app script is shown below. Copy this and add whatever # # You should have received a copy of the GNU Affero General # Public License along with this program. If not, see -# <http://www.gnu.org/licenses/>. +# # 'full' includes your app in the full installation and you -# can also add other variants, separated by spaces. The -# available variants will be detected automatically from the -# app scripts. -VARIANTS='full' +# 'full' includes your app in the full installation and you +# can also add other variants, separated by spaces. The +# available variants will be detected automatically from the +# app scripts. +VARIANTS='full' -SOME_IMPORTANT_CONFIG_VARIABLE='some important value' -ANOTHER_IMPORTANT_CONFIG_VARIABLE='foo' -MY_FUNKY_AVATAR=https://some-domain-or-other/fro.png -MYAPPNAME_ONION_PORT=[port number] -MYAPPNAME_DB_PASSWORD= +# If you want this to appear on the control panel About screen +SHOW_ON_ABOUT=1 -# A directory where the data for this app exists -MYAPP_DATA_DIR=/var/lib/somedirectory +SOME_IMPORTANT_CONFIG_VARIABLE='some important value' +ANOTHER_IMPORTANT_CONFIG_VARIABLE='foo' +MY_FUNKY_AVATAR=https://some-domain-or-other/fro.png +MYAPPNAME_ONION_PORT=[port number] +MYAPPNAME_DB_PASSWORD= -# List of configuration variables used by the app -myappname_variables=(ONION_ONLY +# A directory where the data for this app exists +MYAPP_DATA_DIR=/var/lib/somedirectory + +# List of configuration variables used by the app +myappname_variables=(ONION_ONLY MY_USERNAME SOME_IMPORTANT_CONFIG_VARIABLE ANOTHER_IMPORTANT_CONFIG_VARIABLE @@ -349,31 +352,5490 @@ An example template for an app script is shown below. Copy this and add whatever MYAPPNAME_ONION_PORT MYAPPNAME_DB_PASSWORD) -function change_password_myappname { - PASSWORD_USERNAME="$1" - PASSWORD_NEW="$2" - # Do something to change the password +function change_password_myappname { + PASSWORD_USERNAME="$1" + PASSWORD_NEW="$2" + # Do something to change the password } -function reconfigure_myappname { - echo -n '' - # Do something to delete existing keys/identity and - # generate new ones +function reconfigure_myappname { + echo -n '' + # Do something to delete existing keys/identity and + # generate new ones } -function upgrade_myappname { - echo -n '' - # Do something to upgrade this app. - # If it's a debian package then it will be maintained by the - # operating system and you don't need anything here +function upgrade_myappname { + echo -n '' + # Do something to upgrade this app. + # If it's a debian package then it will be maintained by the + # operating system and you don't need anything here } -function backup_local_myappname { - # If your app has a MariaDB/MySQL database +function backup_local_myappname { + # If your app has a MariaDB/MySQL database backup_database_to_usb myappname - # To backup a directory - backup_directory_to_usb $MYAPP_DATA_DIR myappname + # To backup a directory + backup_directory_to_usb "><http://www.gnu.org/licenses/>. + +# 'full' includes your app in the full installation and you +# can also add other variants, separated by spaces. The +# available variants will be detected automatically from the +# app scripts. +VARIANTS='full' + +# If you want this to appear on the control panel About screen +SHOW_ON_ABOUT=1 + +SOME_IMPORTANT_CONFIG_VARIABLE='some important value' +ANOTHER_IMPORTANT_CONFIG_VARIABLE='foo' +MY_FUNKY_AVATAR=https://some-domain-or-other/fro.png +MYAPPNAME_ONION_PORT=[port number] +MYAPPNAME_DB_PASSWORD= + +# A directory where the data for this app exists +MYAPP_DATA_DIR=/var/lib/somedirectory + +# List of configuration variables used by the app +myappname_variables=(ONION_ONLY + MY_USERNAME + SOME_IMPORTANT_CONFIG_VARIABLE + ANOTHER_IMPORTANT_CONFIG_VARIABLE + MY_FUNKY_AVATAR + MYAPPNAME_ONION_PORT + MYAPPNAME_DB_PASSWORD) + +function change_password_myappname { + PASSWORD_USERNAME="$1" + PASSWORD_NEW="$2" + # Do something to change the password +} + +function reconfigure_myappname { + echo -n '' + # Do something to delete existing keys/identity and + # generate new ones +} + +function upgrade_myappname { + echo -n '' + # Do something to upgrade this app. + # If it's a debian package then it will be maintained by the + # operating system and you don't need anything here +} + +function backup_local_myappname { + # If your app has a MariaDB/MySQL database + backup_database_to_usb myappname + + # To backup a directory + backup_directory_to_usb $MYAPP_DATA_DIR myappname # if you need to backup data within individual user # home directories @@ -541,9 +6003,9 @@ Submit your working app to -

Customising mesh images

-
+
+

Customising mesh images

+

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 img/backgrounds and to change the available avatars and desktop icons edit the images within img/avatars. Re-create disk images using the instructions shown previously.