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
----------------------------------
--- /dev/null
+#!/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