add web install script, update readmes
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Wed, 14 Jul 2010 21:08:40 +0000 (21:08 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Wed, 14 Jul 2010 21:08:40 +0000 (21:08 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@564 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

README
debian/README.server
www/install.sh [new file with mode: 0755]

diff --git a/README b/README
index e0839e4..4d5cef6 100644 (file)
--- a/README
+++ b/README
@@ -12,6 +12,8 @@ Mind the warning below.
 
 See the HTML files in the doc directory for more information.
 
+See the Debian README for server installation.
+
 Copyrights
 -----------
 
index 30b17d7..6b31d45 100644 (file)
@@ -46,10 +46,45 @@ cannot access the same tables (upgrade is possible though).
 Execute /usr/share/magicsmoke-server/install.sh with your target directory
 as parameter.
 
-Now edit the config.php file, it is pretty self-explanatory.
+Now edit the config.php file, it is a simple PHP file. Although theoretically
+all facilities of PHP are available there, you should stick to the format of
+the template.
 
-Make sure you have the right database configuration inside the config.php
-file. You will find examples for MySQL and for Postgres inside.
+3.1 Database Options
+- - - - - - - - - - -
+
+The database section describes which database is used for storing data and
+how the database interface behaves.
+
+The $db variable is supposed to point to an object of a class derived from
+DbEngine. There are currently two of those:
+
+MysqlEngine uses the MySQLi interface of PHP to access a MySQL 5.x database
+
+PGsqlEngine uses the PGSQL interface of PHP to access a Postgres database.
+To be compatible with MagicSmoke the server should be at least version 8.x
+
+Examples are available in the configuration file template.
+
+The $olddb variable if set can be used to upgrade a MagicSmoke 1.0 database
+to version 2.0. After upgrade you should comment it out.
+
+3.2 Dedicated Client Configuration
+- - - - - - - - - - - - - - - - - -
+
+This section configures the behavior of the server towards the 
+
+There is only one option: the timeout for client sessions. It is safe to leave
+it at the default.
+
+3.3 Web Client Configuration
+- - - - - - - - - - - - - - -
+
+This section configures the behavior of the web interface.
+
+These options configure the timeouts of cookies, what features
+are available to users and what features of the template engine
+are available.
 
 4 - Creating the Database Content
 ----------------------------------
diff --git a/www/install.sh b/www/install.sh
new file mode 100755 (executable)
index 0000000..eacf31c
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+BASE=$(cd `dirname $0`; pwd)
+
+if test $# -ne 1 ; then
+ echo Usage: $0 '<directory>'
+ echo
+ echo "This tool installs the current version of the"
+ echo "MagicSmoke server into the given directory."
+ exit 1
+fi
+
+TARGET=$1
+mkdir -p $TARGET
+
+echo "Copying/Linking from $BASE to $TARGET..."
+
+xln(){
+ echo "Linking $1..."
+ ln -sfT $BASE/$1 $TARGET/$1
+}
+
+xln inc
+xln images
+xln admin.php
+xln index.php
+xln machine.php
+xln translations
+
+xcp(){
+ a=$TARGET/$1
+ test x$2 == x && b=$BASE/$1 || b=$BASE/$2
+ test -e $a && echo "$a exists, please synchronize with $b manually"
+ test -e $a || {
+  cp -a $b $a
+  echo "Installed $a: please modify it to suit your needs."
+ }
+}
+
+xcp styles
+xcp template
+xcp config.php config.php.template
\ No newline at end of file