replace /home/koha/koha with var

This commit is contained in:
2022-06-23 11:55:09 +02:00
parent 35c2daaa08
commit 6a106a5573
3 changed files with 67 additions and 67 deletions

View File

@@ -23,7 +23,7 @@ set -e
# Read configuration variable file if it is present
[ -r /etc/default/koha-common ] && . /etc/default/koha-common
export PERL5LIB=/home/koha/koha/lib
export PERL5LIB={{ koha_install_dir }}/lib
usage()
{
@@ -53,9 +53,9 @@ start_plack()
{
local instancename=$1
local PIDFILE="/home/koha/koha/var/run/plack.pid"
local PLACKSOCKET="/home/koha/koha/var/run/plack.sock"
local PSGIFILE="/home/koha/koha/bin/plack/koha.psgi"
local PIDFILE="{{ koha_install_dir }}/var/run/plack.pid"
local PLACKSOCKET="{{ koha_install_dir }}/var/run/plack.sock"
local PSGIFILE="{{ koha_install_dir }}/bin/plack/koha.psgi"
local NAME="${instancename}-koha-plack"
if [ -e "/etc/koha/plack.psgi" ]; then
@@ -71,7 +71,7 @@ start_plack()
-E deployment --socket ${PLACKSOCKET} ${PSGIFILE}"
if ! is_plack_running ${instancename}; then
export KOHA_CONF="/home/koha/koha/etc/koha-conf.xml"
export KOHA_CONF="{{ koha_install_dir }}/etc/koha-conf.xml"
if [ -e "/etc/koha/koha-conf.xml" ]; then
# pick instance-specific psgi file
KOHA_CONF="/etc/koha/koha-conf.xml"
@@ -94,7 +94,7 @@ stop_plack()
{
local instancename=$1
local PIDFILE="/home/koha/koha/var/run/plack.pid"
local PIDFILE="{{ koha_install_dir }}/var/run/plack.pid"
if is_plack_running ${instancename}; then
@@ -115,7 +115,7 @@ stop_plack()
restart_plack()
{
local instancename=$1
local PIDFILE="/home/koha/koha/var/run/plack.pid"
local PIDFILE="{{ koha_install_dir }}/var/run/plack.pid"
if is_plack_running ${instancename}; then
@@ -195,7 +195,7 @@ is_plack_running()
{
local instancename=$1
if start-stop-daemon --pidfile "/home/koha/koha/var/run/plack.pid" \
if start-stop-daemon --pidfile "{{ koha_install_dir }}/var/run/plack.pid" \
--status ; then
return 0
else

View File

@@ -17,8 +17,8 @@
use Modern::Perl;
use lib("/home/koha/koha/lib");
use lib("/home/koha/koha/lib/installer");
use lib("{{ koha_install_dir }}/lib");
use lib("{{ koha_install_dir }}/lib/installer");
use Plack::Builder;
use Plack::App::CGIBin;
@@ -54,16 +54,16 @@ use CGI qw(-utf8 ); # we will loose -utf8 under plack, otherwise
}
my $intranet = Plack::App::CGIBin->new(
root => '/home/koha/koha/intranet/cgi-bin'
root => '{{ koha_install_dir }}/intranet/cgi-bin'
)->to_app;
my $opac = Plack::App::CGIBin->new(
root => '/home/koha/koha/opac/cgi-bin/opac'
root => '{{ koha_install_dir }}/opac/cgi-bin/opac'
)->to_app;
my $apiv1 = builder {
my $server = Mojo::Server::PSGI->new;
$server->load_app('/home/koha/koha/api/v1/app.pl');
$server->load_app('{{ koha_install_dir }}/api/v1/app.pl');
$server->to_psgi_app;
};