<arg><option>--adminuser</option> n</arg>
<arg><option>--enable-sru</option></arg>
<arg><option>--sru-port</option> port</arg>
+ <arg><option>--upload-path</option> directory</arg>
<arg><option>--help</option>|<option>-h</option></arg>
<arg choice="req" rep="norepeat"><replaceable>instancename</replaceable></arg>
</varlistentry>
<varlistentry>
+ <term><option>--upload-path</option></term>
+ <listitem>
+ <para>Specifiy a <option>directory</option> for storing the instance's uploaded files.
+ It defaults to <filename>/var/lib/koha/instance/uploads</filename>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--help</option>,<option>-h</option></term>
<listitem>
<para>Print usage information.</para>
--database dbname Enforce the use of the specified DB name (64 char limit)
--adminuser n Explicit the admin user ID in the DB. Relevant in
conjunction with --defaultsql and --populate-db.
+ --upload-path dir Set a user defined upload_path. It defaults to
+ /var/lib/koha/<instance>/uploads
--help,-h Show this help.
Note: the instance name cannot be longer that 11 chars.
-e "s/__DB_PASS__/$mysqlpwd/g" \
-e "s/__UNIXUSER__/$username/g" \
-e "s/__UNIXGROUP__/$username/g" \
+ -e "s/__UPLOAD_PATH__/$UPLOAD_PATH/g" \
-e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \
-e "s/__MEMCACHED_NAMESPACE__/$MEMCACHED_NAMESPACE/g" \
-e "s/__MEMCACHED_SERVERS__/$MEMCACHED_SERVERS/g" \
}
+set_upload_path()
+{
+ local $instance="$1"
+
+ if [ "$CLO_UPLOAD_PATH" != "" ]; then
+ UPLOAD_PATH=$CLO_UPLOAD_PATH
+ else
+ UPLOAD_PATH="$UPLOAD_PATH_BASE/$instance/$UPLOAD_DIR"
+ fi
+}
+
enable_sru_server()
{
# remove the commenting symbols
# hardcoded memcached defaults
DEFAULT_MEMCACHED_SERVERS="127.0.0.1:11211"
DEFAULT_MEMCACHED_PREFIX="koha_"
+# hardcoded upload_path
+UPLOAD_PATH_BASE="/var/lib/koha"
+UPLOAD_DIR="uploads"
+UPLOAD_PATH=""
# SRU server variables
ENABLE_SRU="no"
[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" )
-TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser:,memcached-servers:,memcached-prefix:, \
+TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser:,memcached-servers:,memcached-prefix:,upload-path:, \
-n "$0" -- "$@"`
# Note the quotes around `$TEMP': they are essential!
CLO_AUTHORITIES_INDEXING_MODE=""
CLO_MEMCACHED_SERVERS=""
CLO_MEMCACHED_PREFIX=""
+CLO_UPLOAD_PATH=""
while true ; do
ENABLE_SRU="yes" ; shift ;;
--sru-port)
SRU_SERVER_PORT="$2" ; shift 2 ;;
+ --upload-path)
+ CLO_UPLOAD_PATH="$2" ; shift 2 ;;
-h|--help)
usage ; exit 0 ;;
--)
name="$1"
+set_upload_path $name
+
if [ "$USE_MEMCACHED" = "yes" ]; then
set_memcached $name
elif [ "$CLO_MEMCACHED_SERVERS" != "" ] || \