From 76746d513a1239332fc5bc160295ad7e8fa989ec Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 13 Mar 2019 00:21:14 -0300 Subject: [PATCH] Bug 22508: Add upload_public_path to config Signed-off-by: Hugo Agud --- debian/scripts/koha-create | 15 +++++++++++++++ debian/templates/koha-conf-site.xml.in | 1 + etc/koha-conf.xml | 1 + 3 files changed, 17 insertions(+) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index 5e60f7cd77..61a6aa9a9c 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -70,6 +70,7 @@ Options: --timezone time/zone Specify a timezone. e.g. America/Argentina --upload-path dir Set a user defined upload_path. It defaults to /var/lib/koha//uploads + --upload-public-path dir Set a user defined upload_public_path. --tmp-path dir Set a user defined tmp_path. It defaults to /var/lib/koha//tmp --letsencrypt Set up a https-only site with letsencrypt certificates @@ -108,6 +109,7 @@ generate_config_file() { -e "s#__TEMPLATE_CACHE_DIR__#$TEMPLATE_CACHE_DIR#g" \ -e "s#__TIMEZONE__#$TIMEZONE#g" \ -e "s#__UPLOAD_PATH__#$UPLOAD_PATH#g" \ + -e "s#__UPLOAD_PUBLIC_PATH__#$UPLOAD_PUBLIC_PATH#g" \ -e "s#__TMP_PATH__#$TMP_PATH#g" \ -e "s/__LOG_DIR__/\/var\/log\/koha\/$name/g" \ -e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \ @@ -250,6 +252,16 @@ set_upload_path() fi } +set_upload_public_path() +{ + local instance="$1" + + if [ "$CLO_UPLOAD_PUBLIC_PATH" != "" ]; then + UPLOAD_PUBLIC_PATH=$CLO_UPLOAD_PUBLIC_PATH + fi +} + + set_tmp_path() { local instance="$1" @@ -387,6 +399,7 @@ CLO_ADMINUSER="" CLO_MEMCACHED_SERVERS="" CLO_MEMCACHED_PREFIX="" CLO_UPLOAD_PATH="" +CLO_UPLOAD_PUBLIC_PATH="" CLO_TMP_PATH="" CLO_LETSENCRYPT="" CLO_TEMPLATE_CACHE_DIR="" @@ -432,6 +445,8 @@ while true ; do CLO_TIMEZONE="$2" ; shift 2 ;; --upload-path) CLO_UPLOAD_PATH="$2" ; shift 2 ;; + --upload-public-path) + CLO_UPLOAD_PUBLIC_PATH="$2" ; shift 2 ;; --tmp-path) CLO_TMP_PATH="$2" ; shift 2 ;; --letsencrypt) diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in index e9e562439d..603ebafa6b 100644 --- a/debian/templates/koha-conf-site.xml.in +++ b/debian/templates/koha-conf-site.xml.in @@ -276,6 +276,7 @@ __END_SRU_PUBLICSERVER__ __PLUGINS_DIR__ 0 __UPLOAD_PATH__ + __UPLOAD_PUBLIC_PATH__ __TMP_PATH__ /usr/share/koha/intranet/cgi-bin /usr/share/koha/opac/cgi-bin/opac diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml index b6c9d52f13..ab062d8a0f 100644 --- a/etc/koha-conf.xml +++ b/etc/koha-conf.xml @@ -93,6 +93,7 @@ __PAZPAR2_TOGGLE_XML_POST__ __PLUGINS_DIR__ 0 + __INTRANET_CGI_DIR__ __OPAC_CGI_DIR__/opac -- 2.11.0