<arg><option>--adminuser</option> n</arg>
<arg><option>--enable-sru</option></arg>
<arg><option>--sru-port</option> port</arg>
+ <arg><option>--template-cache-dir</option> directory</arg>
<arg><option>--upload-path</option> directory</arg>
<arg><option>--letsencrypt</option></arg>
<arg><option>--help</option>|<option>-h</option></arg>
</varlistentry>
<varlistentry>
+ <term><option>--template-cache-dir</option></term>
+ <listitem>
+ <para>Specify a <option>directory</option> for storing the template cache files of the instance.
+ It defaults to <filename>/var/cache/koha/instance/templates</filename>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--upload-path</option></term>
<listitem>
<para>Specify a <option>directory</option> for storing the permanently uploaded files of the instance.
--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.
+ --template-cache-dir Set a user defined template_cache_dir. It defaults to
+ /var/cache/koha/<instance>/templates
--upload-path dir Set a user defined upload_path. It defaults to
/var/lib/koha/<instance>/uploads
--letsencrypt Set up a https-only site with letsencrypt certificates
-e "s/__DB_PASS__/$mysqlpwd/g" \
-e "s/__UNIXUSER__/$username/g" \
-e "s/__UNIXGROUP__/$username/g" \
+ -e "s#__TEMPLATE_CACHE_DIR__#$TEMPLATE_CACHE_DIR#g" \
-e "s#__UPLOAD_PATH__#$UPLOAD_PATH#g" \
-e "s/__LOG_DIR__/\/var\/log\/koha\/$name/g" \
-e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \
UPLOAD_PATH_BASE="/var/lib/koha"
UPLOAD_DIR="uploads"
UPLOAD_PATH=""
+# cache base dir
+CACHE_DIR_BASE="/var/cache/koha"
# Generate a randomizaed API secret
API_SECRET="$(pwgen -s 64 1)"
# SRU server variables
[ $# -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:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,upload-path:,letsencrypt, \
+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:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,template-cache-dir:,upload-path:,letsencrypt, \
-n "$0" -- "$@"`
# Note the quotes around `$TEMP': they are essential!
CLO_MEMCACHED_PREFIX=""
CLO_UPLOAD_PATH=""
CLO_LETSENCRYPT=""
+CLO_TEMPLATE_CACHE_DIR=""
while true ; do
case "$1" in
ENABLE_SRU="yes" ; shift ;;
--sru-port)
SRU_SERVER_PORT="$2" ; shift 2 ;;
+ --template-cache-dir)
+ CLO_TEMPLATE_CACHE_DIR="$2" ; shift 2 ;;
--upload-path)
CLO_UPLOAD_PATH="$2" ; shift 2 ;;
--letsencrypt)
MEMCACHED_PREFIX=""
fi
+# Set template cache dir
+if [ "$CLO_TEMPLATE_CACHE_DIR" != "" ]; then
+ TEMPLATE_CACHE_DIR="$CLO_TEMPLATE_CACHE_DIR"
+else
+ TEMPLATE_CACHE_DIR="$CACHE_DIR_BASE/$name/templates"
+fi
+
# Are we root? If not, the mod_rewrite check will fail and be confusing, so
# we look into this first.
if [[ $UID -ne 0 ]]
generate_config_file zebra.passwd.in \
"/etc/koha/sites/$name/zebra.passwd"
-
# Create a GPG-encrypted file for requesting a DB to be set up.
if [ "$op" = request ]
then